releases.shpreview
Vercel/AI SDK/ai@7.0.0-canary.134

UI message validation no longer rejects errored tool calls

ai@7.0.0-canary.134

Patch Changes

  • ed74dae: fix(ui): make input optional on output-error tool and dynamic-tool UI message parts

    validateUIMessages rejected persisted assistant messages whose output-error tool parts had no input key. This happened for any errored tool call where the SDK set input: undefined (e.g. NoSuchToolError / InvalidToolInputError): JSON serialization stripped the undefined value, and Zod 4.4+ treats a missing z.unknown() key as a validation failure (previously it was implicitly optional). The schema now matches the runtime shape produced by process-ui-message-stream, so reloading a thread that contains an errored tool call no longer throws AI_TypeValidationError.

  • f4cc8eb: feat: add performance statistics

  • e80ada0: fix(ai): download tool-result file URLs

  • 1dca341: fix: rename telemetry onFinish to onEnd

  • 2605e5f: fix test mocks to return the first array-backed result on the first call

Fetched May 13, 2026