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.
Last release today
06 Oct 2026
Ships on a steady schedule
a new release about every 8 days
Some releases are documented
notes for 26 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
1572 releases · first in 2014
### Patch Changes - 7ee3f10: chore: updated docs
### Patch Changes - Updated dependencies [462ad00] - @ai-sdk/provider-utils@4.0.10 - @ai-sdk/gateway@3.0.24
ea0feb5: fix(ai): clean up step timeout when error occurs in streamText
One column per quarter.
### Patch Changes - Updated dependencies [cbf1704] - @ai-sdk/gateway@3.0.23
ded661b: feat(ai): add onStepFinish to agent.generate and agent.stream
4de5a1d: chore: excluded tests from src folder in npm package
### Patch Changes - Updated dependencies [2b8369d] - @ai-sdk/gateway@3.0.21
### Patch Changes - Updated dependencies [8dc54db] - @ai-sdk/gateway@3.0.20
### Patch Changes - Updated dependencies [c60fdd8] - @ai-sdk/gateway@3.0.19
### Patch Changes - Updated dependencies [7af4eb4] - @ai-sdk/gateway@3.0.18
2dc9bfa: fix(ai): handle provider-executed tools and tool-approval-response in validation
providerExecuted: true (deferred results)### Patch Changes - Updated dependencies [66d78d5] - @ai-sdk/gateway@3.0.17
84b6e6d: Revert "feat(ai): expose token usage in useChat onFinish callback#11871
ab57783: Add usage information to onFinish callback in useChat
4e28ba0: fix(ai): propagate providerMetadata during input-streaming state
4e28ba0: fix(ai): propagate providerMetadata during input-streaming state
Provider-executed tools (like MCP tools) need to send metadata during the streaming phase, but the implementation only set callProviderMetadata when part.state === "input-available". This fix removes the overly-restrictive state check and adds callProviderMetadata to the input-streaming state types and schemas.
### Patch Changes - Updated dependencies [5c090e7] - @ai-sdk/provider@3.0.4 - @ai-sdk/gateway@3.0.16 - @ai-sdk/provider-utils@4.0.8
b5dab9b: fix(ai): maintain OpenTelemetry context across async generator yields
b5dab9b: fix(ai): maintain OpenTelemetry context across async generator yields
Fixes an issue where OpenTelemetry context was lost at async generator yield boundaries, causing nested ToolLoopAgent spans to escape to the parent agent's level in observability platforms.
The fix ensures that when recordSpan is used with async generators (e.g., in tool execution), the active context is explicitly maintained using context.with(), preventing span hierarchy corruption in nested agent scenarios.
Closes #11720
46f46e4: fix(provider-utils): improve tool type inference when using inputExamples with Zod schemas that use .optional().default() or .refine().
inputExamples with Zod schemas that use .optional().default() or .refine().d7e7f1f: Add descriptive error messages for malformed UIMessageStream chunks.
1b11dcb: chore(ai): include sources in npm package
0ca078c: fix(ai): pass providerMetadata in smooth stream to preserve thinking tag
ec24401: chore(ai): include docs in npm package
### Patch Changes - Updated dependencies [92b339b] - @ai-sdk/gateway@3.0.13
### Patch Changes - Updated dependencies [34d1c8a] - @ai-sdk/provider-utils@4.0.5 - @ai-sdk/gateway@3.0.12
fdce123: docs: update README with usage example for @ai-sdk/anthropic
d4486d2: fix(ai): do not cleanup AsyncIterableStream twice
### Patch Changes - Updated dependencies [891a60a] - @ai-sdk/gateway@3.0.11
40d4997: feat(ai): add middleware for extracting JSON
b64f256: Add elementStream to streamText for streaming individual array elements when using output: Output.array().
elementStream to streamText for streaming individual array elements when using output: Output.array().4f236c8: feat(ai): per-chunk timeouts for streamText
a4c680a: feat(ai): per-step timeouts for generateText and streamText
f0d29de: chore(ai): remove \_internal.currentDate from streamText
9667780: fix(ai): preserve rawInput in safeValidateUIMessages for output-error tool parts
9667780: fix(ai): preserve rawInput in safeValidateUIMessages for output-error tool parts
Fixes #11406
f748c46: Updated Unified Provider Architecture section in README to describe AI Gateway as the default.
### Patch Changes - Updated dependencies [2696fd2] - @ai-sdk/gateway@3.0.10
d6ec0e2: chore(ai): remove \_internal.currentDate from generateText
af0955e: streamText should throw timeout error with proper cause when it times out
81adf59: feat(ai): introduce timeout configuration object
3a73fb3: Include abort reason in stream chunks and document the new field
3f9453f: feat(ai): add timeout option to generateText, streamText, and Agent
e2c445d: feat(ai): smoothStream reasoning support
d937c8f: Add Image model middleware support via wrapImageModel and ImageModelV3Middleware.
wrapImageModel and ImageModelV3Middleware.### Patch Changes - Updated dependencies [8ec1984] - @ai-sdk/gateway@3.0.8
ae26f95: Add missing .catch() handler to executeToolCall promise in runToolsTransformation to prevent potential stream hang when the promise rejects.
.catch() handler to executeToolCall promise in runToolsTransformation to prevent potential stream hang when the promise rejects.4e90233: feat(ui): add DirectChatTransport
### Patch Changes - Updated dependencies [0b429d4] - @ai-sdk/provider-utils@4.0.3 - @ai-sdk/gateway@3.0.7
### Patch Changes - Updated dependencies [74c0157] - @ai-sdk/gateway@3.0.6
### Patch Changes - Updated dependencies [7ee2d12] - @ai-sdk/gateway@3.0.5
863d34f: fix: trigger release to update @latest
@latest### Patch Changes - Updated dependencies [1dad057] - @ai-sdk/gateway@3.0.3
29264a3: feat: add MCP tool approval
129ff26: fix(ai): skip tool input validation in safeValidateUIMessages when output-error state has undefined input
129ff26: fix(ai): skip tool input validation in safeValidateUIMessages when output-error state has undefined input
Fixes #11392
Updated dependencies [c0c8a0e]
### Patch Changes - Updated dependencies [387980f] - @ai-sdk/gateway@3.0.0
614599a: chore(ai): deprecate generateObject and streamObject
0c3b58b: fix(provider): add specificationVersion to ProviderV3
58920e0: fix(ai): do not drop custom headers in HttpChatTransport
a7da2b6: feat(agent): change output generics
0adc679: feat(provider): shared spec v3
50b70d6: feat(anthropic): add programmatic tool calling
2d28066: chore(agent): limit agent call parameters
fca786b: feat(agent): configurable call options
046aa3b: feat(provider): speech model v3 spec
e1f6e8e: feat(ai): add Output.json()
8d9e8ad: chore(provider): remove generics from EmbeddingModelV3
Before
model.textEmbeddingModel("my-model-id");
After
model.embeddingModel("my-model-id");
b67d224: Fixes an issue where providerMetadata and providerExecuted were lost when tool input validation failed
ab6f01a: Improve ai gateway error message when api key is not present
9388ff1: feat(ui): add isDataUIPart helper
dce03c4: feat: tool input examples
2625a04: feat(openai); update spec for mcp approval
37c58a0: This release introduces wrapEmbeddingModel, a new helper that brings embedding model customization capabilities similar to wrapLanguageModel.
4e2b04d: fix(gateway): throw error with user-friendly message in non-production environments if AI_GATEWAY_API_KEY is not configured
ab1087b: feat(ai): chat.addToolResult() is now chat.addToolOutput()
bb10a89: fix(ai): mcp errors to be jsonrpc 2.0 compliant
457f1c6: feat(ai): onFinish callback for generateText
95f65c2: chore: use import * from zod/v4
754df61: fix(ai): correct type field in arrayOutputStrategy from 'enum' to 'array'
58920e0: refactor: consolidate header normalization across packages, remove duplicates, preserve custom headers
954c356: feat(openai): allow custom names for provider-defined tools
7fdd89d: feat(agent): export AgentCallParameters and AgentStreamParameters types
eca63f3: feat(ai): add OAuth for MCP clients + refactor to new package
This change replaces
import { experimental_createMCPClient } from "ai";
import { Experimental_StdioMCPTransport } from "ai/mcp-stdio";
with
import { experimental_createMCPClient } from "@ai-sdk/mcp";
import { Experimental_StdioMCPTransport } from "@ai-sdk/mcp/mcp-stdio";
90e5bdd: chore(ai): restructure agent files
42cf7ed: fix(agent): use tool.toModelOutput when available
544d4e8: chore(specification): rename v3 provider defined tool to provider tool
4812235: fix(ai): add missing export for LoadSettingError
7f2c9b6: fix(ui): do not submit automatically when server return with error
614599a: chore(ai): deprecate generateObject and streamObject
0c4822d: feat: EmbeddingModelV3
e062079: chore(agent): move Agent.respond into createAgentStreamResponse function
2b49dae: feat(agent): support UIMessageStreamOptions in createAgentStreamResponse
ee651d7: https://v6.ai-sdk.dev -> https://ai-sdk.dev
5a4e732: Export parseJsonEventStream and uiMessageChunkSchema from "ai" package
f733285: fix(ai): only parse experimental_output in generateText when finishReason is stop
9b83947: feat(ai): add convertDataPart option to convertToModelMessages
Add optional convertDataPart callback for converting custom data parts (URLs, code files, etc.) to text or file parts that models can process. Fully type-safe using existing UIMessage generics.
7eca093: fix(ai): update uiMessageChunkSchema to satisfy the UIMessageChunk type
077aea3: feat(ai): stable structured output on generateText, streamText, and ToolLoopAgent
9f20c87: chore: updated README
521c537: feat(ai): Tool.needsApproval can be a function
7169511: feat(agent): support context in onFinish callback
e8109d3: feat: tool execution approval
03849b0: move DelayedPromise into provider utils
ed329cb: feat: Provider-V3
22ef5c6: feat(ai): Output.text() is default output mode
9ba4324: feat(ai): support SystemModelMessage[] in system and instructions properties
3bd2689: feat: extended token usage
293a6b7: Added a title to the tools
7c3c216: fixed docs and exported NoSpeechGeneratedError
c62ecf0: feat(ai): add support for v2 specs in transcription and speech models
d1bdadb: Added experimental_rerank support
703459a: feat: tool execution approval for dynamic tools
3071620: fix header loss when statusText is undefined in writeHead
7e4649f: fix(core): Fix image download behavior when the initial model is swapped out during prepareStep
48454ab: fix(ai): handle backpressure in writeToServerResponse
e06b663: feat(agent): support experimental stream transforms
83e5744: feat: support async Tool.toModelOutput
8c98371: Extend addToolResult to support error results
b1405bf: feat(ai): send context into streamText / generateText onFinish callbacks
a5e152d: fix(ai): back version support for V2 providers
aa0515c: feat(ai): move Agent to stable
f6f0c5a: chore: remove zod from ui packages
3ed5519: chore: rename ToolCallOptions to ToolExecutionOptions
eb8d1cb: fix not catching of empty arrays in validateUIMessage
e7d9b00: feat(agent): add optional name property to agent
d5b25ee: feat(ai): add Output.array()
d7bae86: feat(ai): add Output.choice()
8dac895: feat: LanguageModelV3
a755db5: feat(ai): improve warnings with provider and model id
1c2a4c1: fix(ai): remove outdated jsdoc param descriptions
686103c: chore(ai): export ContentPart type
0d6c0d8: chore(ai): remove deprecated CodeMessage type and related types and functions
9b8d17e: fix(agent): move provider options to main agent config
79a8e7f: feat(agent): support abortSignal in createAgentUIStream
d59ce25: fix(ai): do not mutate middleware array argument when wrapping
475189e: chore(specification): rename EmbeddingModelCallOptions
3d83f38: chore(ai): improve addToolInputExamplesMiddleware
457318b: chore(provider,ai): switch to SharedV3Warning and unified warnings
b681d7d: feat: expose usage tokens for 'generateImage' function
c99da05: feat(ai): add onFinish to Agent
db913bd: fix(google): add thought signature to gemini 3 pro image parts
9061dc0: feat: image editing
8445d70: feat: export GatewayModelId and use to type LanguageModel
32223c8: feat: add toolCallId arg to toModelOutput
8370068: fix(provider/google): preserve thoughtSignature through tool execution
5e313e3: fix(agent): do not allow static tools when tools is empty
db62f7d: Added schema name and description for generateText and output
a7f6f81: Add safeValidateUIMessages utility to validate UI messages without throwing, returning a success/failure result object like Zod’s safeParse
79ba99f: feat(agent): add message metadata support when inferring UI messages
c98373a: chore(agent): rename createAgentStreamResponse to createAgentUIStreamResponse
846e80e: fix(ai): bind functions for v2 -> v3 adapter
bbdcb81: Add experimental_context parameter to prepareStep callback
67a407c: chore(ai): add warning when using v2 models with AISDK v6
9524761: chore(ai): rename relevanceScore to score
ca13d26: feat(ai): add output to StreamTextResult
4616b86: chore: update zod peer depenedency version
a322efa: Added finishReason on useChat onFinish callbck
2d166e4: feat(provider/gateway): add support for image models
384142c: feat(agent): add abortSignal parameter to generate and stream
36b175c: chore(ai): change output generics
2b1bf9d: feat(ai): add pruneMessages helper function
81d4308: feat: provider-executed dynamic tools
e0d1ea9: fix(ai): align logic of text-end with reasoning-end
2406576: chore(agent): rename messages property on agent ui stream functions to uiMessages
b1aeea7: feat(ai): set default stopWhen on Agent to isStepCount(20)
dce4e7b: chore(agent): rename system to instructions
4ece5f9: feat(agent): add experimental_download to ToolLoopAgent
a417a34: feat(agent): introduce version property
637eaa4: feat(ai): print model warnings in embed and embedMany
177b475: fix(ai): download files when intermediate file cannot be downloaded
21e20c0: feat(provider): transcription model v3 spec
afe7093: feat: add middleware for tool input examples
61f7b0f: chore(agent): rename BasicAgent to ToolLoopAgent
af9dab3: fix(ai): remove unused mode setting from generateObject and streamObject
522f6b8: feat: ImageModelV3
97b1d77: fix(ui): Don't resend messages for providerExecuted tools in lastAssistantMessageIsCompleteWithToolCalls and lastAssistantMessageIsCompleteWithApprovalResponses
69768c2: chore(ai): remove UI message reference from model message validation
27e8c3a: chore(ai): rename Agent to BasicAgent, introduce Agent interface
81e29ab: feat(ai): allow modifying experimental context in prepareStep
7da02d2: fix(ai): prune messages properly when toolCalls set to 'before-last-message'
763d04a: feat: Standard JSON Schema support
95b77e2: feat(agent): extract createAgentUIStream, add pipeAgentUIStreamToResponse
3794514: feat: flexible tool output content support
cbf52cd: feat: expose raw finish reason
14ca35d: feat: add support for v2 specs
10c1322: fix: moved dependency @ai-sdk/test-server to devDependencies
dcdac8c: chore(ai): rename tool helpers
960ec8f: chore: change argument of toModelOutput to parameter object
b59d924: feat(ai): support SystemModelMessage in system and instructions properties
1bd7d32: feat: tool-specific strict mode
95f65c2: chore: load zod schemas lazily
Updated dependencies
ee651d7: https://v6.ai-sdk.dev -> https://ai-sdk.dev
https://v6.ai-sdk.dev -> https://ai-sdk.dev### Patch Changes - Updated dependencies [7294355] - @ai-sdk/gateway@2.0.0-beta.93
475189e: chore(specification): rename EmbeddingModelCallOptions
### Patch Changes - 9f20c87: chore: updated README
2625a04: feat(openai); update spec for mcp approval
cbf52cd: feat: expose raw finish reason
Your coding agent can read these notes before it upgrades. Set up the MCP server →