NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm, #2684 most downloaded on npm
AI SDK by Vercel - build apps like ChatGPT, Claude, Gemini, and more with a single interface for any model using the Vercel AI Gateway or go direct to OpenAI, Anthropic, Google, or any other model provider.
Latest stable
7.0.169
Last release 10 days ago
10 Nov 2026
Ships on a steady schedule
a new release about every 8 days
Some releases are documented
notes for 27 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
1654 releases · first in 2014
Drag across the ruler to compare, or tap a release to open it.
023550e: Deprecate streamText result fullStream in favor of stream.
streamText result fullStream in favor of stream.e67d80e: fix: rename onFinish to onEnd
onChunkYour coding agent can read these notes before it upgrades. Set up the MCP server →
594029e: feat(ai): wrap the model call in telemetry context
6c93e36: feat(provider-utils): add spawnCommand method to Experimental_Sandbox to allow for detached command execution
spawnCommand method to Experimental_Sandbox to allow for detached command execution@ai-sdk/gateway@4.0.0-canary.91
@ai-sdk/gateway@4.0.0-canary.90
@ai-sdk/gateway@4.0.0-canary.89
e3d9c0e: Add allowSystemInMessages option to ToolLoopAgent.
e3d9c0e: Add allowSystemInMessages option to ToolLoopAgent.
This exposes the same option that exists on streamText and generateText, whether role: "system" messages are allowed in the prompt or messages fields. When unset, system messages are rejected because they can create a prompt injection attack risk. Ideally, use the instructions option instead. Set to true to allow system messages, or false to explicitly reject them.
const agent = new ToolLoopAgent({
model,
allowSystemInMessages: true,
});
await agent.generate({
messages: [
{ role: "system", content: "Server context" },
{ role: "user", content: "Hello" },
],
});
The option can also be returned from prepareCall for dynamic per-call configuration.
@ai-sdk/gateway@4.0.0-canary.88
@ai-sdk/gateway@4.0.0-canary.87
@ai-sdk/gateway@4.0.0-canary.86
7fc6bd6: Raise minimum supported Node.js version to 22. Supported versions: 22, 24, and 26.
62d6481: Post-publish release notifications now link to each package’s GitHub release and npm page.
e3a0419: fix(ai): default missing embedding warnings to an empty array
@ai-sdk/gateway@4.0.0-canary.83
334ae5d: Update step performance metrics with explicit effective, input, output, and total token throughput fields.
@ai-sdk/gateway@4.0.0-canary.81
98627e5: feat(ai): remove onChunk event from telemetry
a7de9c9: fix: make sandbox experimental
@ai-sdk/provider-utils@5.0.0-canary.39
ed74dae: fix(ui): make input optional on output-error tool and dynamic-tool UI message parts
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
38ca8dc: fix(gateway): enable retry support for gateway errors
eaf849f: Rename rerank telemetry finish callback to onRerankEnd.
onRerankEnd.b67525f: feat: instructions as prepareStep input
@ai-sdk/gateway@4.0.0-canary.76
@ai-sdk/provider-utils@5.0.0-canary.37
e95e38d: fix: Make generateText and streamText result usage report total usage across all steps and deprecate totalUsage.
generateText and streamText result usage report total usage across all steps and deprecate totalUsage.instructions as the primary prompt option and deprecate systemfinalStep on text generation results@ai-sdk/provider-utils@5.0.0-canary.35
c0c8ca2: fix(ai): remove deprecated LanguageModelUsage properties
69aeb0e: feat: add deprecated tool call lifecycle callback aliases for AI SDK 6 compatibility.
7392266: feat: move includeRawChunks to include.rawChunks
79b2468: feat: add request.messages to StepResult
2427d88: feat(ai): change Tool.sensitiveContext to telemetry.includeToolsContext and make it opt-in
5463d0d: feat(provider): align tool result output content file part types with top-level message file part types
@ai-sdk/gateway@4.0.0-canary.69
47e65d6: fix(ai): tag step/chunk timeout aborts with TimeoutError reason
47e65d6: fix(ai): tag step/chunk timeout aborts with TimeoutError reason
When timeout: { stepMs } or timeout: { chunkMs } fires, the abort reason is now a TimeoutError DOMException, matching what AbortSignal.timeout() produces natively. Consumers can distinguish a framework timeout from a user-initiated cancel via signal.reason.name === 'TimeoutError'.
0c4c275: trigger initial canary release
Nothing published for this version
### Patch Changes - Updated dependencies [77cc1af] - @ai-sdk/gateway@4.0.0-beta.114
### Patch Changes - Updated dependencies [eb024b6] - @ai-sdk/gateway@4.0.0-beta.113
75763b0: agents: tag outgoing requests with an ai-sdk-agent user-agent segment for usage attribution (tool-loop, workflow)
0416e3e: feat (video): add first-class generateAudio call option
generateAudio call option### Patch Changes - Updated dependencies [8e990ff] - @ai-sdk/gateway@4.0.0-beta.111
cc6ab90: feat(ai): rename ui message stream onFinish to onEnd
6a2caf9: Serialize undefined tool output to null in UI message chunks
undefined tool output to null in UI message chunks81a284b: fix(ai): handle partial unicode escapes in fixJson
### Patch Changes - Updated dependencies [987d9e4] - @ai-sdk/gateway@4.0.0-beta.110
b097c52: feat(ai): use tracing channels to track parent-child context
b8396f0: trigger initial beta release
### Patch Changes - Updated dependencies [e7e8f42] - @ai-sdk/gateway@4.0.0-beta.67
08d2129: feat(mcp): propagate the server name through dynamic tool parts
1f7db50: fix(ai): remove experimental_customProvider
allowSystemInMessages across streamText retries9f0e36c: trigger release for all packages after provenance setup
cf93359: feat(ai): remove/refactor event data sent via callbacks
5f3749c: refactoring: rename toolNeedsApproval to toolApproval
0a51f7d: fix(ai): enforce callOptionsSchema at runtime in ToolLoopAgent
ToolLoopAgentSettings.callOptionsSchema was declared and documented as a runtime schema for options, but tool-loop-agent.ts never invoked it. Any invariant a developer encoded in the schema was silently bypassed at runtime, and unchecked options flowed straight into prepareCall and any instructions template that interpolated them.
ToolLoopAgent.prepareCall now validates caller-supplied options against callOptionsSchema (when set) via safeValidateTypes, throwing InvalidArgumentError on failure before forwarding to prepareCall / generateText / streamText.
71d3022: fix(ai): unify generate text event callbacks
67df0a0: feat: add sensitiveContext property to Tool
4181cfe: fix(ai): harden getMediaTypeFromUrl against prototype-property collisions
getMediaTypeFromUrl (used to infer media types for file-url / image-url parts) used ext in URL_EXTENSION_TO_MEDIA_TYPE against a plain object literal. A URL ending in .constructor therefore resolved through the prototype chain and returned the Object constructor function, violating the helper's : string return type and forwarding a non-string value to provider adapters.
Switch to Object.hasOwn(...) so attacker-controlled extensions like .constructor cannot resolve to inherited Object.prototype keys.
51ce232: feat(ai): add sensitiveRuntimeContext option
befb78c: refactoring: remove real-time delays in unit tests
29d8cf4: feat(ai): rename the core-event types
58a2ad7: fix: more precise default message for tool execution denial
37d69b2: feat(ai): access runtime context in tool approval functions
1043274: feat(ai): add a ModelCall start/end event
7f59f04: feat(ai): add approval reason to automatic tool approvals
7677c1e: feat(ai): allow tool approval functions to return undefined
f58f9bc: fix(ai): remove stopWhen from onStart event
e1bfb9c: feat(ai): remove unnecessary data from events
e87d71b: feat(ai): support automatic tool approval in ui messages
9d486aa: feat(ai): generic tool approval function
9b0bc8a: fix(mcp): prevent prototype pollution by using secureJsonParse
fc92055: feat(ai): automatic tool approval
Updated dependencies [785fe16]
Updated dependencies [67df0a0]
Updated dependencies [befb78c]
Updated dependencies [0458559]
Updated dependencies [5852c0a]
Updated dependencies [baa5f20]
Updated dependencies [fc92055]
Updated dependencies [f9acbc0]
1949571: feat(ai): make experimental_telemetry stable
*TelemetryIntegration to *Telemetryf319fde: feat(ai): validate tool context against contextSchema at runtime
Tool execution and approval callbacks now validate each tool's toolsContext entry against its contextSchema. Invalid tool context now throws TypeValidationError with tool-context validation metadata in error.context.
511902c: skip validation for tool parts in terminal states when tool schema is no longer registered
2e98477: fix: retain stack traces on async errors
876fd3e: fix(ai): limit tool execution time duration to actual tool execution
f32c750: refactoring(ai): simplify mergeAbortSignals
Updated dependencies [2e98477]
75ef93e: remove the deprecated experimental_output alias and document the output migration for AI SDK 7
experimental_output alias and document the output migration for AI SDK 7@ai-sdk/provider-utils@5.0.0-beta.24
350ea38: refactoring: introduce Arrayable type
### Patch Changes - Updated dependencies [03dc15c] - @ai-sdk/gateway@4.0.0-beta.58
33d099c: fix(ai): omit reasoning-start/end when sendReasoning is false
One column per quarter.