What changed in AI SDK from 6 to 7
41 releases numbered after 6.0.276 up to and including 7.0.92, stable releases only. 6.0.276 and 7.0.92 are the newest stable releases of 6 and 7 we track; this page follows them as new ones ship.
88 changes across 41 releases
- Add configurable recovery for provider errors received after streamText response streaming begins through streamRetries option
- Add StreamTextOnErrorRetryCallback for bounded callback-directed recovery with streamRetries: 0
- Extend the FilesV4 interface with optional getFileMetadata, downloadFile (streaming), and deleteFile operations
- Add abortSignal and headers call options to FilesV4 interface
- Add { type: 'stream' } upload data variant to FilesV4 interface
- Expose byteSize, createdAt, and expiresAt in upload results
- Surface byteSize, createdAt, and expiresAt through the core uploadFile() helper
- Add postMultipartStreamToApi function for streaming multipart uploads with deterministic part ordering and failure-path stream teardown
- Add deleteFromApi function to provider-utils
- Add createBinaryStreamResponseHandler function to provider-utils
- Add tool calling support to batch
- support signed tool approvals in WorkflowAgent
- Expose individual image generation calls
- Expose parsed structured output in streamText end callbacks
- Add operation-level outcomes to UI message stream end callbacks
- Add batch completion webhooks where experimental_startTextBatch accepts a webhookUrl, and the gateway provider registers it through the batch callbackUrl contract and exports typed async-job metadata
- Add typed custom bodies to Completion APIs
- Allow `aspectRatio: 'adaptive'` on `generateVideo` for video models that derive output ratio from input.
- Expose provider metadata on language-model-call end callbacks and telemetry spans
- Add batch APIs
- Allow `ToolLoopAgent` `prepareCall` callbacks to read and override the top-level `reasoning` option
- Add `defaultInstructionsMiddleware` for applying default language model instructions while preserving call-level overrides
- Add asynchronous start/status flow to the experimental video model interface (VideoModelV4) with doStart, doStatus, and handleWebhookOption methods
- Add poll and webhook options to experimental_generateVideo for asynchronous completion orchestration
- Add custom delay implementation support for polling configuration to enable durable workflow compatibility
- Support experimental_toolCallers in streamText
- Support experimental tool callers in ToolLoopAgent
- Update @ai-sdk/gateway to 4.0.73
- Updated @ai-sdk/gateway to version 4.0.72
- Updated @ai-sdk/provider-utils to version 5.0.36
- Forward abortSignal and headers in the core uploadFile() helper
- Validate persisted typed tool calls against current input and output schemas, with schema-incompatible inputs loading as dynamic tool parts instead of exposing unvalidated values
- Allow chats to continue automatically after tool approval denials reach the output-denied state
- Allow manual tool approval statuses to include a reason and preserve it across core, model, and UI approval requests
- OPA requires-approval decisions now surface their reason to human approvers
- UI request chunks serialize the optional reason, while UI messages retain it as approval.requestReason separately from an approver's response reason
- Direct Anthropic and OpenAI batch providers return an unsupported warning when the webhookUrl option is provided
- Updated @ai-sdk/gateway to 4.0.60
- Updated @ai-sdk/gateway to version 4.0.59
- Updated @ai-sdk/gateway to version 4.0.55
- Updated @ai-sdk/gateway to version 4.0.54
- Updated @ai-sdk/gateway to version 4.0.53
- @ai-sdk/gateway dependency updated to version 4.0.51
- Allow providers without reranking model support to be assigned to Provider
- Reduce bundle size by making internal Zod v4 imports tree-shakeable.
- Updated @ai-sdk/provider-utils to 5.0.24
- Updated @ai-sdk/gateway to 4.0.45
- Simplify tool caller configuration in code-mode
- Updated @ai-sdk/gateway to version 4.0.38
- @ai-sdk/gateway updated to version 4.0.37
- Updated @ai-sdk/provider-utils to version 5.0.18
- Updated @ai-sdk/gateway to version 4.0.36
- Updated @ai-sdk/gateway to version 4.0.35
- preserve provider metadata from empty smooth stream deltas
- surface fallback errors for empty HTTP response bodies
- skip smoothStream delays while the document is hidden
- expose call ID and abort reason in streamText onAbort callbacks
- Prevent generateText from accepting responses that violate required tool choices
- Preserve approval descriptors in UI message streams
- Ensure canonical hashes preserve undefined array element positions
- Sum Gateway image-generation costs across split requests
- Preserve native message batch request counts in provider metadata and support the full language-model option surface in batch requests
- Allow tool approval secrets in ToolLoopAgent settings and prepareCall
- Handle stateful and empty-match regular expressions in smoothStream
- Handle stitchable stream cancellation before an inner stream is registered
- Preserve active text and reasoning parts when another merged UI message stream finishes a step, and align workflow stream normalization with the explicit part end chunks
- Parse structured generateText output when providers omit finishReason but return text
- Prevent duplicate text and reasoning part ids
- Allow nullish metadata schemas for UI messages with branded IDs
- Prevent exceptions in streaming onChunk and onError callbacks from terminating the stream or masking provider errors
- Stop multi-step text generation for client tool approval even when a provider-executed tool has a deferred result
- Reject streamObject result promises and report failed completion when the provider stream errors
- Filter preliminary tool outputs when ignoreIncompleteToolCalls is enabled
- Prevent automatic tool execution when a model call ends with an unsafe finish reason
- Clear partial UI message parts when a WorkflowAgent model-call step is retried
- Keep chat status submitted until response content begins streaming
- Fix declaration emit for exported values that infer an Output type
- Avoid repeatedly cloning accumulated text in readUIMessageStream while preserving independent snapshots for mutable nested values
- Preserve root-level JSON Schema definitions when wrapping array output schemas
- Propagate errors thrown by the Chat onFinish callback to the initiating request
- Preserve reasoning block IDs from UI message streams on reasoning UI parts
- Respect ToolLoopAgent timeouts configured in agent settings.
- Make retried doStart calls idempotent by minting one idempotency token per logical start and forwarding it as an idempotency-key header to prevent duplicate billable generations on retry after lost response
- Stop pending and active resumed chat streams after cancellation and prevent overlapping resumptions from applying stale updates
- Preserve preceding assistant messages when regenerating a response
- Skip re-validating tool input for terminal output-available UI message parts
- Warn when generateText receives streaming-only firstChunkMs or chunkMs timeout settings
- Fix telemetry attribution for language model calls that resolve to a different response model
3 releases in the range carry no categorized changes yet: 7.0.777.0.597.0.51. Their original notes, where the vendor published any, are below.
Original release notes, newest first
The list above is our reading of these notes; the originals from Vercel are here, one fold per release.
7.0.92
Patch Changes
- a51cc94: fix(ai): preserve provider metadata from empty smooth stream deltas
- d1904d3: fix(ai): surface fallback errors for empty HTTP response bodies
- 84e5a79: fix(ai): skip
smoothStreamdelays while the document is hidden - a8e8ad0: fix(ai): expose call ID and abort reason in streamText onAbort callbacks
- Updated dependencies [a7e324b]
- @ai-sdk/gateway@4.0.74
7.0.91
Patch Changes
- 802af1e: Add configurable recovery for provider errors received after
streamTextresponse streaming begins. Explicitly configuringstreamRetriesenables isolated retry attempts, including one bounded callback-directed recovery throughStreamTextOnErrorRetryCallbackwithstreamRetries: 0; recovered results and metadata reflect only the successful attempt, while the existingStreamTextOnErrorCallbackcontract and logging-only observer behavior remain compatible. - Updated dependencies [5484f27]
- Updated dependencies [36eb7ee]
- Updated dependencies [622fa7f]
- @ai-sdk/gateway@4.0.73
7.0.90
Patch Changes
- Updated dependencies [4d25a08]
- Updated dependencies [6bcc0f8]
- @ai-sdk/gateway@4.0.72
- @ai-sdk/provider-utils@5.0.36
7.0.89
Patch Changes
- 5190b67: feat(provider): extend the FilesV4 interface with optional
getFileMetadata,downloadFile(streaming), anddeleteFileoperations, plusabortSignal/headerscall options and a{ type: 'stream' }upload data variant; upload results now exposebyteSize,createdAt, andexpiresAt(also surfaced by the coreuploadFile()helper, which now forwardsabortSignal/headers); addpostMultipartStreamToApi(streaming multipart uploads with deterministic part ordering and failure-path stream teardown),deleteFromApi, andcreateBinaryStreamResponseHandlerto provider-utils - Updated dependencies [5190b67]
- @ai-sdk/provider@4.0.10
- @ai-sdk/provider-utils@5.0.35
- @ai-sdk/gateway@4.0.71
7.0.88
Patch Changes
- 8b6b756: fix(ai): prevent generateText from accepting responses that violate required tool choices
- e07b577: feat: add tool calling support to batch
7.0.87
Patch Changes
- 850d863: fix(ai): preserve approval descriptors in UI message streams
7.0.86
Patch Changes
- 11109ae: feat(ai): support signed tool approvals in WorkflowAgent
- Updated dependencies [1329d5a]
- @ai-sdk/gateway@4.0.70
7.0.85
Patch Changes
- 55a9981: Ensure canonical hashes preserve undefined array element positions.
- dd32de2: fix(ai): sum Gateway image-generation costs across split requests
- aa45741: fix(provider/anthropic): preserve native message batch request counts in provider metadata and support the full language-model option surface in batch requests
- cc29073: feat(ai): expose individual image generation calls
- Updated dependencies [d2507af]
- Updated dependencies [aa45741]
- @ai-sdk/gateway@4.0.69
- @ai-sdk/provider@4.0.9
- @ai-sdk/provider-utils@5.0.34
7.0.84
Patch Changes
- 6669d69: Expose parsed structured output in
streamTextend callbacks. - a6463ca: fix(ai): allow tool approval secrets in ToolLoopAgent settings and prepareCall
- e604532: fix(ai): handle stateful and empty-match regular expressions in smoothStream
- Updated dependencies [805bbfc]
- Updated dependencies [90192f1]
- @ai-sdk/gateway@4.0.68
- @ai-sdk/provider-utils@5.0.33
7.0.83
Patch Changes
- 8dd86a9: Validate persisted typed tool calls against current input and output schemas. Schema-incompatible empty or error inputs and terminal history from unavailable tools remain loadable as dynamic tool parts instead of exposing unvalidated values under current static tool types.
- fda13b3: Allow chats to continue automatically after tool approval denials reach the
output-deniedstate. - 957146c: add operation-level outcomes to UI message stream end callbacks
- ce6849a: fix(ai): handle stitchable stream cancellation before an inner stream is registered
7.0.82
Patch Changes
- 3e125ba: Allow manual tool approval statuses to include a reason and preserve it across
core, model, and UI approval requests. OPA
requires-approvaldecisions now surface their reason to human approvers. UI request chunks serialize the optionalreason, while UI messages retain it asapproval.requestReasonseparately from an approver's responsereason. - Updated dependencies [0e7994c]
- Updated dependencies [3e125ba]
- @ai-sdk/gateway@4.0.67
- @ai-sdk/provider-utils@5.0.32
7.0.79
Patch Changes
- b251584: Preserve active text and reasoning parts when another merged UI message stream finishes a step, and align workflow stream normalization with the explicit part end chunks.
- 591d25b: feat: add batch completion webhooks.
experimental_startTextBatchaccepts awebhookUrl, and the gateway provider registers it through the batchcallbackUrlcontract and exports typed async-job metadata. Direct Anthropic and OpenAI batch providers return an unsupported warning when the option is provided. - 9de0baf: Parse structured generateText output when providers omit finishReason but return text.
- Updated dependencies [591d25b]
- @ai-sdk/gateway@4.0.64
- @ai-sdk/provider@4.0.8
- @ai-sdk/provider-utils@5.0.30
7.0.77
Patch Changes
- Updated dependencies [b74971f]
- Updated dependencies [a371615]
- @ai-sdk/provider-utils@5.0.29
- @ai-sdk/gateway@4.0.62
7.0.76
Patch Changes
- c6d57f3: fix(ai): prevent duplicate text and reasoning part ids
- 677a707: fix(ai): allow nullish metadata schemas for UI messages with branded IDs
7.0.74
Patch Changes
- Updated dependencies [5941bd6]
- Updated dependencies [9a4337d]
- @ai-sdk/gateway@4.0.60
7.0.73
Patch Changes
- Updated dependencies [f607a12]
- @ai-sdk/gateway@4.0.59
7.0.71
Patch Changes
- 9a37469: Prevent exceptions in streaming
onChunkandonErrorcallbacks from terminating the stream or masking provider errors. - Updated dependencies [936719b]
- @ai-sdk/gateway@4.0.57
7.0.70
Patch Changes
- 9566914: Stop multi-step text generation for client tool approval even when a provider-executed tool has a deferred result.
- b181020: fix: reject
streamObjectresult promises and report failed completion when the provider stream errors - 7054073: Filter preliminary tool outputs when
ignoreIncompleteToolCallsis enabled. - a828527: Prevent automatic tool execution when a model call ends with an unsafe finish reason.
- d3cc3fe: Clear partial UI message parts when a WorkflowAgent model-call step is retried.
- Updated dependencies [e6087c9]
- @ai-sdk/provider-utils@5.0.28
- @ai-sdk/gateway@4.0.56
7.0.69
Patch Changes
- Updated dependencies [1f7a464]
- @ai-sdk/gateway@4.0.55
7.0.68
Patch Changes
- Updated dependencies [257632b]
- @ai-sdk/gateway@4.0.54
7.0.67
Patch Changes
- Updated dependencies [a0b1ffc]
- @ai-sdk/gateway@4.0.53
7.0.66
Patch Changes
- 0782259: Keep chat status submitted until response content begins streaming.
- 2fd1214: Fix declaration emit for exported values that infer an
Outputtype.
7.0.65
Patch Changes
- dc8caae: Avoid repeatedly cloning accumulated text in
readUIMessageStreamwhile preserving independent snapshots for mutable nested values. - 72ec74f: Preserve root-level JSON Schema definitions when wrapping array output schemas.
- c5b0515: Propagate errors thrown by the Chat
onFinishcallback to the initiating request. - Updated dependencies [16650e9]
- @ai-sdk/gateway@4.0.52
7.0.64
Patch Changes
- Updated dependencies [ea75787]
- Updated dependencies [b20de9e]
- @ai-sdk/gateway@4.0.51
7.0.63
Patch Changes
- d0a5807: Preserve reasoning block IDs from UI message streams on reasoning UI parts.
- dcf33e8: Allow providers without reranking model support to be assigned to
Provider. - Updated dependencies [a4d386d]
- @ai-sdk/gateway@4.0.50
7.0.62
Patch Changes
- e0bcf52: feat(ui): add typed custom bodies to Completion APIs
7.0.59
Patch Changes
- Updated dependencies [401a4ba]
- Updated dependencies [7af9646]
- @ai-sdk/provider-utils@5.0.26
- @ai-sdk/gateway@4.0.47
7.0.58
Patch Changes
-
72ad23f: Respect ToolLoopAgent timeouts configured in agent settings.
-
ad6a650: feat(video): allow
aspectRatio: 'adaptive'ongenerateVideoSome video models derive the output ratio from the input and reject explicit
{width}:{height}values — BytePlus Seedance 2.5 does this for first-frame, first-and-last-frame, editing, and extension tasks.aspectRatioonVideoModelV3CallOptions,VideoModelV4CallOptions, andexperimental_generateVideois now`${number}:${number}` | 'adaptive', so those calls no longer need a type assertion. Support is provider-specific. -
81cd026: Reduce bundle size by making internal Zod v4 imports tree-shakeable.
-
Updated dependencies [c477556]
-
Updated dependencies [ad6a650]
-
Updated dependencies [81cd026]
- @ai-sdk/gateway@4.0.46
- @ai-sdk/provider@4.0.7
- @ai-sdk/provider-utils@5.0.25
7.0.57
Patch Changes
- Updated dependencies [1937bef]
- @ai-sdk/provider-utils@5.0.24
- @ai-sdk/gateway@4.0.45
7.0.56
Patch Changes
-
25c9120: Expose provider metadata on language-model-call end callbacks and telemetry spans.
-
89080c8: fix (ai/gateway): make retried
doStartcalls idempotentgenerateVideoretriesdoStart, which creates a billable generation, so a retry after a lost response could start a second one. It now mints one idempotency token per logical start — outside the retry closure — and forwards it as anidempotency-keyheader, so a provider that deduplicates (the Vercel AI Gateway does) sees the same key on every attempt.GatewayVideoModelsimply forwards the caller's headers rather than inferring retry identity from an options object, which would collide across unrelated calls. -
79d6195: Stop pending and active resumed chat streams after cancellation, and prevent overlapping resumptions from applying stale updates.
-
Updated dependencies [89080c8]
-
Updated dependencies [89080c8]
- @ai-sdk/gateway@4.0.44
7.0.55
Patch Changes
- 3469d0c: feat: add batch APIs
- Updated dependencies [3469d0c]
- @ai-sdk/provider@4.0.6
- @ai-sdk/gateway@4.0.43
- @ai-sdk/provider-utils@5.0.23
7.0.54
Patch Changes
- a6b17a2: Allow
ToolLoopAgentprepareCallcallbacks to read and override the top-levelreasoningoption. - 5615eb7: Add
defaultInstructionsMiddlewarefor applying default language model instructions while preserving call-level overrides. - 36a3ff6: Preserve preceding assistant messages when regenerating a response.
7.0.52
Patch Changes
- 3836a85: Skip re-validating tool input for terminal output-available UI message parts.
- Updated dependencies [1bec07d]
- Updated dependencies [53c326e]
- Updated dependencies [d765f82]
- @ai-sdk/provider-utils@5.0.21
- @ai-sdk/gateway@4.0.41
7.0.51
Patch Changes
- Updated dependencies [160ccdb]
- @ai-sdk/provider-utils@5.0.20
- @ai-sdk/gateway@4.0.40
7.0.50
Patch Changes
-
79e133c: async APIs for generateVideo (poll, webhook)
Adds an asynchronous start/status flow to the experimental video model interface (
VideoModelV4): models may now implementdoStart,doStatus, andhandleWebhookOptioninstead of (or in addition to)doGenerate, andexperimental_generateVideoacceptspollandwebhookoptions to orchestrate completion via polling or webhooks. Polling configuration can use a custom delay implementation for durable workflow compatibility. -
da64b51: feat(code-mode): simplify tool caller configuration
-
Updated dependencies [79e133c]
- @ai-sdk/provider@4.0.5
- @ai-sdk/gateway@4.0.39
- @ai-sdk/provider-utils@5.0.19
7.0.49
Patch Changes
- Updated dependencies [fb6d2f8]
- @ai-sdk/gateway@4.0.38
7.0.48
Patch Changes
- Updated dependencies [bdd5e28]
- @ai-sdk/gateway@4.0.37
7.0.47
Patch Changes
- Updated dependencies [5fc7da5]
- Updated dependencies [93b2acd]
- @ai-sdk/provider-utils@5.0.18
- @ai-sdk/gateway@4.0.36
7.0.46
Patch Changes
- Updated dependencies [4f2e064]
- @ai-sdk/gateway@4.0.35
7.0.45
Patch Changes
- d6ce0ee: feat(ai): support experimental_toolCallers in streamText
- fa95504: feat(ai): support experimental tool callers in ToolLoopAgent
- 349afe7: Warn when
generateTextreceives streaming-onlyfirstChunkMsorchunkMstimeout settings. - Updated dependencies [fa95504]
- @ai-sdk/provider-utils@5.0.17
- @ai-sdk/gateway@4.0.34
7.0.44
Patch Changes
- 015acb4: fix telemetry attribution for language model calls that resolve to a different response model