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

Added 27

7.0.91

  • 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

7.0.89

  • 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

7.0.88

  • Add tool calling support to batch

7.0.86

  • support signed tool approvals in WorkflowAgent

7.0.85

  • Expose individual image generation calls

7.0.84

  • Expose parsed structured output in streamText end callbacks

7.0.83

  • Add operation-level outcomes to UI message stream end callbacks

7.0.79

  • 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

7.0.62

  • Add typed custom bodies to Completion APIs

7.0.58

  • Allow `aspectRatio: 'adaptive'` on `generateVideo` for video models that derive output ratio from input.

7.0.56

  • Expose provider metadata on language-model-call end callbacks and telemetry spans

7.0.55

  • Add batch APIs

7.0.54

  • 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

7.0.50

  • 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

7.0.45

  • Support experimental_toolCallers in streamText
  • Support experimental tool callers in ToolLoopAgent
Changed 26

7.0.91

  • Update @ai-sdk/gateway to 4.0.73

7.0.90

  • Updated @ai-sdk/gateway to version 4.0.72
  • Updated @ai-sdk/provider-utils to version 5.0.36

7.0.89

  • Forward abortSignal and headers in the core uploadFile() helper

7.0.83

  • 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

7.0.82

  • 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

7.0.79

  • Direct Anthropic and OpenAI batch providers return an unsupported warning when the webhookUrl option is provided

7.0.74

  • Updated @ai-sdk/gateway to 4.0.60

7.0.73

  • Updated @ai-sdk/gateway to version 4.0.59

7.0.69

  • Updated @ai-sdk/gateway to version 4.0.55

7.0.68

  • Updated @ai-sdk/gateway to version 4.0.54

7.0.67

  • Updated @ai-sdk/gateway to version 4.0.53

7.0.64

  • @ai-sdk/gateway dependency updated to version 4.0.51

7.0.63

  • Allow providers without reranking model support to be assigned to Provider

7.0.58

  • Reduce bundle size by making internal Zod v4 imports tree-shakeable.

7.0.57

  • Updated @ai-sdk/provider-utils to 5.0.24
  • Updated @ai-sdk/gateway to 4.0.45

7.0.50

  • Simplify tool caller configuration in code-mode

7.0.49

  • Updated @ai-sdk/gateway to version 4.0.38

7.0.48

  • @ai-sdk/gateway updated to version 4.0.37

7.0.47

  • Updated @ai-sdk/provider-utils to version 5.0.18
  • Updated @ai-sdk/gateway to version 4.0.36

7.0.46

  • Updated @ai-sdk/gateway to version 4.0.35
Fixed 35

7.0.92

  • 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

7.0.88

  • Prevent generateText from accepting responses that violate required tool choices

7.0.87

  • Preserve approval descriptors in UI message streams

7.0.85

  • 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

7.0.84

  • Allow tool approval secrets in ToolLoopAgent settings and prepareCall
  • Handle stateful and empty-match regular expressions in smoothStream

7.0.83

  • Handle stitchable stream cancellation before an inner stream is registered

7.0.79

  • 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

7.0.76

  • Prevent duplicate text and reasoning part ids
  • Allow nullish metadata schemas for UI messages with branded IDs

7.0.71

  • Prevent exceptions in streaming onChunk and onError callbacks from terminating the stream or masking provider errors

7.0.70

  • 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

7.0.66

  • Keep chat status submitted until response content begins streaming
  • Fix declaration emit for exported values that infer an Output type

7.0.65

  • 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

7.0.63

  • Preserve reasoning block IDs from UI message streams on reasoning UI parts

7.0.58

  • Respect ToolLoopAgent timeouts configured in agent settings.

7.0.56

  • 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

7.0.54

  • Preserve preceding assistant messages when regenerating a response

7.0.52

  • Skip re-validating tool input for terminal output-available UI message parts

7.0.45

  • Warn when generateText receives streaming-only firstChunkMs or chunkMs timeout settings

7.0.44

  • 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 smoothStream delays 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

View originalPermalink

7.0.91
Patch Changes
  • 802af1e: Add configurable recovery for provider errors received after streamText response streaming begins. Explicitly configuring streamRetries enables isolated retry attempts, including one bounded callback-directed recovery through StreamTextOnErrorRetryCallback with streamRetries: 0; recovered results and metadata reflect only the successful attempt, while the existing StreamTextOnErrorCallback contract and logging-only observer behavior remain compatible.
  • Updated dependencies [5484f27]
  • Updated dependencies [36eb7ee]
  • Updated dependencies [622fa7f]
    • @ai-sdk/gateway@4.0.73

View originalPermalink

7.0.90
Patch Changes
  • Updated dependencies [4d25a08]
  • Updated dependencies [6bcc0f8]
    • @ai-sdk/gateway@4.0.72
    • @ai-sdk/provider-utils@5.0.36

View originalPermalink

7.0.89
Patch Changes
  • 5190b67: feat(provider): extend the FilesV4 interface with optional getFileMetadata, downloadFile (streaming), and deleteFile operations, plus abortSignal/headers call options and a { type: 'stream' } upload data variant; upload results now expose byteSize, createdAt, and expiresAt (also surfaced by the core uploadFile() helper, which now forwards abortSignal/headers); add postMultipartStreamToApi (streaming multipart uploads with deterministic part ordering and failure-path stream teardown), deleteFromApi, and createBinaryStreamResponseHandler to provider-utils
  • Updated dependencies [5190b67]
    • @ai-sdk/provider@4.0.10
    • @ai-sdk/provider-utils@5.0.35
    • @ai-sdk/gateway@4.0.71

View originalPermalink

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

View originalPermalink

7.0.87
Patch Changes
  • 850d863: fix(ai): preserve approval descriptors in UI message streams

View originalPermalink

7.0.86
Patch Changes
  • 11109ae: feat(ai): support signed tool approvals in WorkflowAgent
  • Updated dependencies [1329d5a]
    • @ai-sdk/gateway@4.0.70

View originalPermalink

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

View originalPermalink

7.0.84
Patch Changes
  • 6669d69: Expose parsed structured output in streamText end 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

View originalPermalink

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-denied state.
  • 957146c: add operation-level outcomes to UI message stream end callbacks
  • ce6849a: fix(ai): handle stitchable stream cancellation before an inner stream is registered

View originalPermalink

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-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.
  • Updated dependencies [0e7994c]
  • Updated dependencies [3e125ba]
    • @ai-sdk/gateway@4.0.67
    • @ai-sdk/provider-utils@5.0.32

View originalPermalink

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_startTextBatch accepts a webhookUrl, and the gateway provider registers it through the batch callbackUrl contract 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

View originalPermalink

7.0.77
Patch Changes
  • Updated dependencies [b74971f]
  • Updated dependencies [a371615]
    • @ai-sdk/provider-utils@5.0.29
    • @ai-sdk/gateway@4.0.62

View originalPermalink

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

View originalPermalink

7.0.74
Patch Changes
  • Updated dependencies [5941bd6]
  • Updated dependencies [9a4337d]
    • @ai-sdk/gateway@4.0.60

View originalPermalink

7.0.73
Patch Changes
  • Updated dependencies [f607a12]
    • @ai-sdk/gateway@4.0.59

View originalPermalink

7.0.71
Patch Changes
  • 9a37469: Prevent exceptions in streaming onChunk and onError callbacks from terminating the stream or masking provider errors.
  • Updated dependencies [936719b]
    • @ai-sdk/gateway@4.0.57

View originalPermalink

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 streamObject result promises and report failed completion when the provider stream errors
  • 7054073: Filter preliminary tool outputs when ignoreIncompleteToolCalls is 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

View originalPermalink

7.0.69
Patch Changes
  • Updated dependencies [1f7a464]
    • @ai-sdk/gateway@4.0.55

View originalPermalink

7.0.68
Patch Changes
  • Updated dependencies [257632b]
    • @ai-sdk/gateway@4.0.54

View originalPermalink

7.0.67
Patch Changes
  • Updated dependencies [a0b1ffc]
    • @ai-sdk/gateway@4.0.53

View originalPermalink

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 Output type.

View originalPermalink

7.0.65
Patch Changes
  • dc8caae: Avoid repeatedly cloning accumulated text in readUIMessageStream while 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 onFinish callback to the initiating request.
  • Updated dependencies [16650e9]
    • @ai-sdk/gateway@4.0.52

View originalPermalink

7.0.64
Patch Changes
  • Updated dependencies [ea75787]
  • Updated dependencies [b20de9e]
    • @ai-sdk/gateway@4.0.51

View originalPermalink

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

View originalPermalink

7.0.62
Patch Changes
  • e0bcf52: feat(ui): add typed custom bodies to Completion APIs

View originalPermalink

7.0.59
Patch Changes
  • Updated dependencies [401a4ba]
  • Updated dependencies [7af9646]
    • @ai-sdk/provider-utils@5.0.26
    • @ai-sdk/gateway@4.0.47

View originalPermalink

7.0.58
Patch Changes
  • 72ad23f: Respect ToolLoopAgent timeouts configured in agent settings.

  • ad6a650: feat(video): allow aspectRatio: 'adaptive' on generateVideo

    Some 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. aspectRatio on VideoModelV3CallOptions, VideoModelV4CallOptions, and experimental_generateVideo is 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

View originalPermalink

7.0.57
Patch Changes
  • Updated dependencies [1937bef]
    • @ai-sdk/provider-utils@5.0.24
    • @ai-sdk/gateway@4.0.45

View originalPermalink

7.0.56
Patch Changes
  • 25c9120: Expose provider metadata on language-model-call end callbacks and telemetry spans.

  • 89080c8: fix (ai/gateway): make retried doStart calls idempotent

    generateVideo retries doStart, 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 an idempotency-key header, so a provider that deduplicates (the Vercel AI Gateway does) sees the same key on every attempt. GatewayVideoModel simply 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

View originalPermalink

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

View originalPermalink

7.0.54
Patch Changes
  • a6b17a2: Allow ToolLoopAgent prepareCall callbacks to read and override the top-level reasoning option.
  • 5615eb7: Add defaultInstructionsMiddleware for applying default language model instructions while preserving call-level overrides.
  • 36a3ff6: Preserve preceding assistant messages when regenerating a response.

View originalPermalink

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

View originalPermalink

7.0.51
Patch Changes
  • Updated dependencies [160ccdb]
    • @ai-sdk/provider-utils@5.0.20
    • @ai-sdk/gateway@4.0.40

View originalPermalink

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 implement doStart, doStatus, and handleWebhookOption instead of (or in addition to) doGenerate, and experimental_generateVideo accepts poll and webhook options 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

View originalPermalink

7.0.49
Patch Changes
  • Updated dependencies [fb6d2f8]
    • @ai-sdk/gateway@4.0.38

View originalPermalink

7.0.48
Patch Changes
  • Updated dependencies [bdd5e28]
    • @ai-sdk/gateway@4.0.37

View originalPermalink

7.0.47
Patch Changes
  • Updated dependencies [5fc7da5]
  • Updated dependencies [93b2acd]
    • @ai-sdk/provider-utils@5.0.18
    • @ai-sdk/gateway@4.0.36

View originalPermalink

7.0.46
Patch Changes
  • Updated dependencies [4f2e064]
    • @ai-sdk/gateway@4.0.35

View originalPermalink

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 generateText receives streaming-only firstChunkMs or chunkMs timeout settings.
  • Updated dependencies [fa95504]
    • @ai-sdk/provider-utils@5.0.17
    • @ai-sdk/gateway@4.0.34

View originalPermalink

7.0.44
Patch Changes
  • 015acb4: fix telemetry attribution for language model calls that resolve to a different response model

View originalPermalink