NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm
npm, #3484 most downloaded on npm
Latest stable
4.0.114
Last release 12 days ago
10 Nov 2026
Ships on a steady schedule
a new release about every 8 days
Some releases are documented
notes for 31 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
3 years old
795 releases · first in 2024
Drag across the ruler to compare, or tap a release to open it.
### Patch Changes - Updated dependencies [4311fa1] - Updated dependencies [4311fa1] - @ai-sdk/provider-utils@5.0.79
22b8158: Avoid repeating the complete parallel-tool wrapper input in every expanded tool call's metadata while preserving wrapper reconstruction for f
6400cf8: Add resolveProviderOptions to parse provider options that a model accepts under several providerOptions keys, either as aliases (first) or me
Your coding agent can read these notes before it upgrades. Set up the MCP server →
resolveProviderOptions to parse provider options that a model accepts under several providerOptions keys, either as aliases (first) or merged in order (merge), and use it for the existing multi-key lookups in the OpenAI, OpenAI-compatible, Anthropic, Google, and Amazon Bedrock models. Resolution behavior for these models is unchanged.c6efa4b: Refactor Azure model ID logic into a model catalog that declares capabilities and provider options, and generate provider capability document
c6efa4b: Refactor Azure model ID logic into a model catalog that declares capabilities and provider options, and generate provider capability documentation from it. Export the OpenAI catalog internally for Azure to reuse. Request behavior is unchanged.
f6dbf04: fix(openai): surface Chat Completions refusals as text content
The Chat Completions model ignored message.refusal (non-streaming) and delta.refusal (streaming). When the model refused to answer, content was null, so the AI SDK returned empty text with a stop finish reason and silently dropped the refusal. Refusal text is now emitted as text content in both generateText and streamText results, and it is emitted in addition to content when the API returns both. A refusal with a stop finish reason is now reported as a content-filter finish reason, matching the Anthropic provider and the Responses API.
646a7e3: fix(openai,openai-compatible): surface refusal logprobs and openai-compatible refusals
@ai-sdk/openai: Chat Completions responses that contain a refusal can return logprobs.refusal next to logprobs.content. The provider previously read only logprobs.content, so providerMetadata.openai.logprobs was empty or missing for refusals. Refusal logprobs are now included in emission order (content logprobs followed by refusal logprobs) in both generateText and streamText.
Streaming logprobs are now collected across all chunks in streamText: previously only the logprobs of the last streamed chunk were reported. This applies to content logprobs as well, so providerMetadata.openai.logprobs now contains the logprobs of every streamed token instead of only the last chunk's tokens. Explicitly empty logprobs (logprobs: { content: [], refusal: null }) are reported as an empty array, as before.
A refusal that arrives in the same streamed chunk as the finish_reason is now taken into account: such a response is reported with a content-filter finish reason instead of stop.
@ai-sdk/openai-compatible: Chat Completions responses that carry message.refusal (non-streaming) or delta.refusal (streaming) were ignored, so providers such as OpenAI served through createOpenAICompatible lost the refusal text and reported an empty stop response. Refusals are now returned as text content after any content text, and a non-empty refusal with a stop finish reason is reported as a content-filter finish reason. This also applies when the refusal and the finish reason arrive in the same streamed chunk. Non-string refusals (for example refusal: false from servers that use booleans) are ignored instead of failing the response.
6b97088: fix(openai): handle refusal content parts in the Responses API
The Responses API returns a refusal content part instead of output_text when the model declines a request. The response schema rejected these parts, so non-streaming calls failed with an APICallError ("Invalid JSON response"), and streamed response.refusal.delta / response.refusal.done events were dropped, producing empty text. Refusal content parts and stream events are now parsed: the refusal explanation is surfaced as text and the finish reason is mapped to content-filter. When the response also contains a client-side function call, the finish reason stays tool-calls so the tools are still executed.
27528db: Expose customTool through azure.tools for Azure Responses models, sharing the OpenAI custom tool factory and its raw string input support.
27528db: Expose customTool through azure.tools for Azure Responses models, sharing the OpenAI custom tool factory and its raw string input support.
7bb309d: add memoryLimit and networkPolicy properties in codeInterpreter tool
7a90522: Add Secure MCP tunnel support to the OpenAI MCP tool via tunnelId. Tunnel targets cannot be combined with serverUrl or connectorId; existing URL and connector configurations remain compatible.
6549344: feat(openai): support GPT Image 2.6 models with complexity, markup-guided edits (markup), animated GIF output (outputFormat: 'gif', frameCount, frameDurationMs), and safetyIdentifier for image models
5f9bb8e: feat (provider/openai): forward the moderation option to /images/edits
934100c: Report the actual OpenAI Chat HTTP endpoint (also used by Azure Chat and Bedrock Mantle Chat) through optional request metadata and model-call end events. Record its host and port on OpenTelemetry chat spans without exposing URL credentials, paths, queries, or fragments. Expose only the sanitized HTTP origin in text and object generation results and step/finish callbacks. Providers that do not report an endpoint leave these attributes unset.
892af4d: feat (provider/openai): implement server-side realtime extensions
OpenAIRealtimeModel now implements getServerWebSocketConfig(), returning the upstream realtime WebSocket URL for conversation and transcription intents plus header auth derived from the model's configured credentials. Dedicated transcription sessions serialize with session.type: "transcription" and the selected realtime model id. Translation is rejected until the normalized realtime codec supports its distinct wire protocol. The event mapper now populates normalized usage on response-done and input-transcription-completed (gross input/output token counts with cached portions reported separately; duration usage for duration-billed transcription).
Transcription serialization honors the explicit transcription model and rejects unsupported output settings. Gross token totals and reported modality/cache counts are retained; duration uses seconds. OpenAI Live retains its existing connection API and rejects unsupported intents.
243bf22: Forward per-message providerOptions.openai.name on Chat Completions system, developer, user, and assistant messages. Validate names as strings and warn when configured on unsupported tool messages.
5cc6d28: Expose azure.tools.shell for local and hosted shell execution through the Azure Responses API.
41465fd: Expose optional transcription word timings separately from segments and accept shared timestampGranularities. Explicit provider timing settings take precedence. OpenAI now sends timestamp_granularities only with verbose_json and warns when a requested timing is unavailable or excluded.
Updated dependencies [36802d4]
Updated dependencies [e0143b0]
Updated dependencies [934100c]
Updated dependencies [892af4d]
Updated dependencies [89aff56]
Updated dependencies [41465fd]
Updated dependencies [9754014]
Updated dependencies [4bb73b0]
Updated dependencies [2e44144]
### Patch Changes - Updated dependencies [fa15312] - @ai-sdk/provider-utils@5.0.74
4ae6986: fix(openai): preserve valid JSON string tool arguments and serialize BigInt and cycles in tool calls and results, retaining malformed argumen
languages and keywords transcription hints as repeated multipart fields instead of silently dropping them. Warn when these REST-only options are supplied to streaming transcription.7716e18: Support promises and synchronous or asynchronous callbacks in provider API key and token settings. Resolve credentials per authenticated requ
7716e18: Support promises and synchronous or asynchronous callbacks in provider API key and token settings. Resolve credentials per authenticated request while preserving existing authentication behavior and synchronous credential serialization.
The experimental OpenAI Live getServerWebSocketConfig() method can now resolve asynchronously. Await its result before using the connection settings.
dcd2f8d: Introduce a model entry contract with named capability sections and request configuration. Consolidate the OpenAI and Anthropic model catalogs so existing request behavior and generated capability documentation use the same source of truth. Catalogs also declare the provider options each provider accepts and which models support them.
Updated dependencies [7716e18]
Updated dependencies [5c247e9]
Updated dependencies [dcd2f8d]
f5fc6ba: Derive known model ID suggestions from each provider's model catalog declarations so catalog updates automatically update autocomplete, while
47b1d8b: feat(openai): send native JSON input and prompt cache keys to Decisions
d07b475: fix(openai): map top-level reasoning to efforts supported by GPT-5.x models instead of sending unsupported values that OpenAI rejects with a 400. max is now only sent on the Responses API, and GPT-5.6 on Chat Completions sends reasoning_effort: 'none' when function tools are used, since it rejects function tools with reasoning. A warning is emitted when a reasoning level was requested.
61a315e: fix: map the top-level reasoning option consistently across providers
Providers now resolve reasoning the same way:
providerOptions is sent unchanged. OpenAI no longer drops providerOptions.openai.reasoningEffort values that are not in its list for the model, and Fireworks no longer rewrites providerOptions.fireworks.reasoningEffort. Fireworks also sends top-level reasoning values directly instead of rounding them to 'high' at most, except for model families known to reject 'none' (GPT-OSS, GLM-5.3, Muse Spark) or 'minimal' (Nemotron, Inkling).reasoning maps to the closest level the model supports, rounding down, and rounds up only when there is no lower level. For example, 'xhigh' now maps to 'high' instead of 'max' on Anthropic and Bedrock models without xhigh effort, and 'medium' maps to 'low' instead of 'high' on DeepSeek, Kimi K3, and Mistral GLM-5.3 models.'none' on a model that cannot disable reasoning maps to the model's lowest level with a compatibility warning, instead of being dropped or sending a request the API rejects. This affects GPT-6 models without 'none', xAI grok-4.5 and later, Groq GPT-OSS, Kimi K3, Perplexity, QuiverAI, Bedrock OpenAI gpt-oss models, and Gemini 2.5 Pro (minimum thinking budget). Gemini 3 and Anthropic and Bedrock between_tools mappings now emit the compatibility warning too.mapReasoningToProviderEffort now accepts any reasoning value, returns an optional providerOptionsEffort unchanged, and rounds levels that are missing from the effort map to the closest supported level. mapReasoningToProviderBudget maps 'none' to the minimum reasoning budget, always returns a budget, and uses the default percentage for levels missing from budgetPercentages. OpenAICompatibleChatConfig adds an optional mapReasoning function for mapping the top-level reasoning option.
Updated dependencies [61a315e]
6d50947: add experimental extraction models backed by structured language model output
01d7a03: feat(openai): add GPT-6.1 Terra model support
599a97f: fix(openai): read transcription duration from usage for duration-billed json responses
durationInSeconds now falls back to usage.seconds when usage.type is duration and the response has no top-level duration (e.g. gpt-transcribe with the default json response format).
8375141: Support streaming transcription with gpt-live-transcribe and gpt-transcribe. For these models the language provider option is sent as a single-entry languages list. gpt-transcribe warns about and omits streaming.delay, which it does not support. gpt-live-transcribe rejects non-streaming transcription, since it has no REST endpoint.
7eac057: fix(openai): strip propertyNames schemas that omit type: 'string' (e.g. Zod 3 records with constrained keys) instead of throwing an unsupported functionality error
436374e: fix(openai): report unfinished web searches as tool errors
9026c7d: fix(openai): only send transcription response format and timestamp defaults when needed
Transcription requests no longer send response_format=verbose_json or timestamp_granularities[]=segment unless the caller sets them or the model needs them. Previously, any providerOptions.openai value (such as a prompt) caused verbose_json to be sent for models like gpt-transcribe, which rejected the request.
Updated dependencies [57086ff]
Updated dependencies [95348b3]
### Patch Changes - Updated dependencies [2ebc78b] - Updated dependencies [cb4fa52] - @ai-sdk/provider-utils@5.0.80 - @ai-sdk/provider@4.0.38
5475347: Fix non-streaming Responses API structured output failing when multiple assistant messages contain JSON. Providers can supply separate struct
final_answer while preserving all generated content, annotations, conversation history, and token usage.README.md for consistent format and to avoid duplication### Patch Changes - Updated dependencies [8202f5b] - Updated dependencies [85d84a1] - @ai-sdk/provider-utils@5.0.67 - @ai-sdk/provider@4.0.33
43ad966: Report interrupted when a stream ends cleanly without its provider completion signal, preserving partial output without emitting an error sol
43ad966: Report interrupted when a stream ends cleanly without its provider completion signal, preserving partial output without emitting an error solely for the interruption.
This applies to OpenAI (Chat, Responses, and Completions), Anthropic, Google (Generate Content and Interactions), Alibaba, Amazon Bedrock Converse, Cohere, DeepSeek, Groq, Hugging Face Responses, Mistral Chat, Moonshot AI, Open Responses, Perplexity, and xAI Responses. It also covers cutoffs in later Anthropic messages and Google automatic continuations.
Compatibility notice: These streams previously fell back to other or omitted the finish part. Applications must now handle interrupted in finish-reason switches, mappings, and custom validation. Check finishReason === 'interrupted' to detect incomplete responses; interruption alone does not trigger error handling.
Explicit unknown completion reasons still map to other. Actual provider, parsing, and transport errors retain their error paths; affected error paths that previously left the finish reason as other now report error. OpenAI-compatible remains unchanged.
Updated dependencies [10026d1]
39a776b: Add a shared encodePathSegment helper and use it to encode provider-returned identifiers in credentialed follow-up request paths.
0c2a9de: Add maxOutputTokens and reasoning to experimental decision calls and forward them to language-model-backed decisions. Language-model adapters
maxOutputTokens and reasoning to experimental decision calls and forward them to language-model-backed decisions. Language-model adapters keep reasoning disabled when omitted. Native decision providers warn when either setting is unsupported.acbc819: Add an optional modelId setting to Azure OpenAI language-model factories for accurate telemetry and capability detection with custom deployme
modelId setting to Azure OpenAI language-model factories for
accurate telemetry and capability detection with custom deployment names. Keep
the deployment ID for API routing and preserve existing behavior when the model
ID is omitted.2be133e: chore(openai): deprecate 'webSearchPreview()' tool
130e871: Restore raw OpenAI custom-tool input deltas for consumers that forward them to Responses API clients. Mark streamed input with inputEncoding:
inputEncoding: 'text' so UI clients can display it progressively without JSON parsing. Preserve the encoding when partial UI messages are saved and resumed. Final provider tool-call inputs remain JSON-encoded.### Patch Changes - Updated dependencies [2e89fa4] - @ai-sdk/provider-utils@5.0.60
216e2c9: fix(openai): send assistant text with content instead of an item reference when its reasoning was removed
216e2c9: fix(openai): send assistant text with content instead of an item reference when its reasoning was removed
With reasoning models and store: true, pruning reasoning (e.g. pruneMessages({ reasoning: 'all' })) caused follow-up requests to fail with "Item 'msg_...' of type 'message' was provided without its required 'reasoning' item". Assistant text parts are now only sent as item references when they are preceded by reasoning in the same assistant message.
6aedb07: fix(openai): replay web search results when response storage is disabled
5cf13d2: feat: map the top level embedding dimensions to provider settings
6c59fb1: fix(openai): preserve sampling parameters for GPT-6 Sol and Luna when reasoning is disabled, accounting for reasoning effort updates in Respo
9184a35: Add ordered text, file, and JSON parts to experimental decision state. Support image input in OpenAI Decisions and language model adapters. G
9184a35: Add ordered text, file, and JSON parts to experimental decision state. Support image input in OpenAI Decisions and language model adapters. Gateway retains its existing string and JSON request format and rejects files, as does TypeSafe AI.
Arrays passed directly as state now contain decision state parts. Wrap JSON arrays in an object or a json part.
Normalize all public state forms into an array of parts before calling decision providers. Providers receive text and JSON objects as text and json parts.
Serialize decision file bytes as base64 in OpenTelemetry state attributes. Model-call spans record normalized state parts, while outer spans retain public state inputs.
Preserve native JSON state in TypeSafe AI when state contains one JSON part. Label shared state in language-model decision prompts.
Updated dependencies [9184a35]
32ff7ad: Preserve tool errors in OpenAI Chat Completions and Responses by wrapping their payloads in an error object. Send Google tool errors and deni
error object. Send Google tool errors and denied executions under functionResponse.response.error.f5fc6ba: Derive known model ID suggestions from each provider's model catalog declarations so catalog updates automatically update autocomplete, while
### Patch Changes - Updated dependencies [6d50947] - @ai-sdk/provider-utils@5.0.81
f5fc6ba: Derive known model ID suggestions from each provider's model catalog declarations so catalog updates automatically update autocomplete, while
fc1e19e: fix: limit jsonl rows to 64mb during batch result downloads
99bdcd2: Replace the OpenAI structured-output wrapper for decide with the native Decisions API. Only gpt-6-luna is currently supported by this endpoint; other Responses models no longer work with openai.decisionModel() or its deprecated evaluationModel() alias.
Responses API options, such as reasoningEffort, are no longer applied and produce unsupported-option warnings. The Decisions API supports providerOptions.openai.safetyIdentifier. Native token usage and confidence values are preserved, and per-question refusals fail the decision call.
268225c: feat(provider): add a portable max reasoning level with native provider mappings, compatibility coercions, and budget-based fallback support.
Compatibility notes:
max widens LanguageModelV4CallOptions['reasoning'] and the derived ReasoningLevel type. Third-party providers and consumers with exhaustive switches or Record<ReasoningLevel, ...> mappings must handle max before upgrading. Ordinary calls using existing reasoning levels remain accepted.reasoning: 'xhigh' now send maxReasoningEffort: 'high' instead of the unsupported 'max', and return a compatibility warning. Anthropic and OpenAI Bedrock effort mappings retain their existing xhigh behavior. Partial Bedrock reasoning configurations continue to preserve explicit values and derive missing fields; explicit effort/budget overrides and disabled thinking no longer emit warnings for portable mappings that are not sent.minimal and xhigh calls keep their request mappings to low and high, respectively, and now return compatibility warnings in generation and streaming results. Portable max maps to high with the same warning behavior.Release classification: This remains a patch changeset under the repository's explicit release policy, which uses patch releases for both fixes and features. The TypeScript source-compatibility caveat for exhaustive consumers is disclosed above. Maintainers can override this classification with a major label if they decide to align the provider-spec addition with a future AI SDK major release.
0af2f7c: chore: upgrade to TypeScript 6
Updated dependencies [fc1e19e]
Updated dependencies [5094ebd]
Updated dependencies [268225c]
Updated dependencies [0af2f7c]
### Patch Changes - Updated dependencies [6d50947] - @ai-sdk/provider-utils@5.0.81
evaluate to decide### Patch Changes - Updated dependencies [2ebc78b] - Updated dependencies [cb4fa52] - @ai-sdk/provider-utils@5.0.80 - @ai-sdk/provider@4.0.38
### Patch Changes - Updated dependencies [2ebc78b] - Updated dependencies [cb4fa52] - @ai-sdk/provider-utils@5.0.80 - @ai-sdk/provider@4.0.38
4e94782: fix(openai): rewrite recursive Zod schemas that use allOf wrappers
allOf wrappersc2511c1: fix: use standards-compliant User-Agent header
e3605f6: Fix streamed tool calls with missing, blank, or repeated IDs.
e3605f6: Fix streamed tool calls with missing, blank, or repeated IDs.
525efc5: feat(provider): advertise image model file and mask input support
Use confirmed model IDs for capability declarations so unrecognized model names remain unknown. Include Together AI FLUX.2 Pro and Flex single-image editing, and allow asynchronous capability lookups and middleware overrides to resolve to unknown.
Advertise QuiverAI Arrow 2 and Arrow 2 Telos file-input support, and mark Together AI Gemini image inputs unsupported by the current single-image request mapping.
Updated dependencies [e3605f6]
Updated dependencies [525efc5]
94d5d6d: Support reasoningEffortUpdate: 'none' for GPT-6 Sol and Luna in request-level options and positioned system messages. Validate update efforts
reasoningEffortUpdate: 'none' for GPT-6 Sol and Luna in request-level options and positioned system messages. Validate update efforts against the model's supported efforts, warning and omitting unsupported request-level updates and rejecting unsupported historical updates.2abd503: Default OpenAI Responses function tools to strict: false when tool strict mode is omitted.
strict: false when tool strict mode is omitted.ca31b89: The OpenAI Responses provider now accepts providerOptions.openai.reasoningEffortUpdate on empty system messages and sends each update at its
providerOptions.openai.reasoningEffortUpdate on empty system messages and sends each update at its position in the conversation. This lets applications change reasoning effort during a conversation while preserving the prompt prefix for caching.4cf5a99: fix(openai): classify Responses stream errors with null codes
6d1f881: fix(openai): expose Chat Completions audio transcripts as generated text
411b3f2: fix(openai): strip unsupported regex patterns from JSON schemas
e76a0a3: fix(openai): cancel image edit URL downloads when the request is aborted
fd75cee: fix(openai): preserve provider file references in Responses tool results
d4d96bf: Add experimental Choice, Score, and Boolean evaluations through openai.evaluationModel() and a shared structured language-model evaluation ad
openai.evaluationModel() and a shared structured language-model evaluation adapter in @ai-sdk/provider-utils/experimental-evaluation. Preserve exact labels and metadata, validate score bounds, and return prompted Boolean P(true) estimates validated to be in [0, 1]. Boolean estimates are not guaranteed to be calibrated; application code chooses thresholds.### Patch Changes - Updated dependencies [91c2128] - Updated dependencies [2cd80b3] - Updated dependencies [d06bb2a] - Updated dependencies [123d71f]
5c0054d: Add optional browser-direct WebRTC for experimental client-delegated Live conversations alongside the existing WebSocket path. Exchange SDP t
5c0054d: Add optional browser-direct WebRTC for experimental client-delegated Live conversations alongside the existing WebSocket path. Exchange SDP through an application endpoint with api.session, configure server-owned data-channel permissions, and preserve committed React session ownership. Capture follows the selected sender track, borrowed tracks remain caller-owned, and disconnect recovery and finalization stay bounded. Applications continue to handle client delegation and submit context; Live session updates and Responses delegation remain unsupported.
Serialize microphone sender changes and close the peer if detachment fails, without stopping borrowed tracks. Validate nonempty SDP setup answers with a bounded response body, and document the same-origin broker authentication contract.
39535af: Add experimental OpenAI Live provider support through the unified openai.experimental_realtime factory for server WebSocket sessions with client delegation. Applications own their agents and tools, receive continuous audio/transcript events and delegation metadata, and return context through validated channels. Support immutable startup options, microphone mute controls, graceful session close, and cumulative voice usage. Responses delegation and Live session updates reject before sending.
Route known Live model IDs to Live, allow an OpenAI-specific api override for early-access models, and preserve legacy Realtime defaults for unknown IDs. Token minting follows the same selection rules and rejects Live before requesting unsupported credentials. Extend the realtime v4 specification with optional server WebSocket configuration, per-connection raw-event parsers, and model-wide startup/finalization capabilities. This provider layer supplies connection settings and protocol mapping for server adapters; browser lifecycle and UI integration belong to the core runtime and framework hooks.
Preserve Realtime client event IDs for session updates and audio appends, and correlate server errors with the originating client event.
Updated dependencies [5c0054d]
Updated dependencies [39535af]
5ec21a6: fix: reject unsupported batch request types
9942196: feat(openai): add batch cancellation and listing
ccb8952: fix(openai): return an AI SDK error for empty chat completion choices
85db433: Include explicit message item types in Azure AI Foundry Responses requests.
8487955: Add xhigh and max quality support for GPT Image 2.5 Flare and Sunburst in image generation, image editing, and the Responses API image genera
xhigh and max quality support for GPT Image 2.5 Flare and Sunburst in image generation, image editing, and the Responses API image generation tool.a4ba394: feat: support per-request models in batch
17e489e : feat(openai): add GPT-6 reasoning configuration updates
6e405ae : fix(xai): preserve additionalProperties: false in tool schemas
gpt-4o-transcribe-diarize, including chunking and diarized speaker metadatab54e551: fix(openai): support documented Responses image generation options
4b8c4fa : feat(xai): add batch cancellation and listing
providerMetadata.<provider>.inputFileId / inputFileExpiresAt) and accept an inputFileExpiresAfter provider option on the OpenAI and xAI batch input file uploadUpdated dependencies [ 912fb01 ]
a4ba394 : feat: support per-request models in batch
getFileMetadata, downloadFile (streaming), and deleteFile on the OpenAI files interface, support streaming uploads via { type: 'stream' } data, expose byteSize/createdAt/expiresAt on upload results, and thread abortSignal/headers through all file operations; blank and dot-segment file ids are rejected/encoded so they cannot retarget request paths048ce06 : feat(batch): surface the uploaded input file on the batch start result ( providerMetadata.<provider>.inputFileId / inputFileExpiresAt ) and
providerMetadata.<provider>.inputFileId / inputFileExpiresAt) and accept an inputFileExpiresAfter provider option on the OpenAI and xAI batch input file uploadUpdated dependencies [ 6bcc0f8 ]
One column per month.