NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm
npm, #1793 most downloaded on npm
Latest stable
5.0.79
Last release 12 days ago
10 Nov 2026
Ships on a steady schedule
a new release about every 9 days
Most releases are documented
notes for 46 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
3 years old
436 releases · first in 2024
Drag across the ruler to compare, or tap a release to open it.
4311fa1: Infer Zod 3 schemas through Standard Schema to prevent recursive type comparisons between installed Zod versions, preserving tool input and s
88b9575: Require a DNS-pinned fetch for untrusted MCP OAuth discovery and metadata-derived token/registration URLs on server runtimes without a protec
Your coding agent can read these notes before it upgrades. Set up the MCP server →
6400cf8: Add resolveProviderOptions to parse provider options that a model accepts under several providerOptions keys, either as aliases (first) or me
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.89aff56: feat(provider-utils): add an experimental_binaryFields option to createJsonResponseHandler
89aff56: feat(provider-utils): add an experimental_binaryFields option to createJsonResponseHandler
Providers whose JSON responses carry large base64 strings (images, files) can list their paths, e.g. createJsonResponseHandler(schema, { experimental_binaryFields: ['images[*]'] }). The body is then read as a stream and canonical base64 strings of 64 KiB and more are decoded to Uint8Array while they arrive, instead of holding about four copies of the body in memory (chunks, concatenated bytes, text, parsed string). rawValue, validation errors and APICallError.responseBody contain a short placeholder string instead of the data. Handlers without the option are unchanged. readResponseWithSizeLimit accepts an optional onChunk callback that receives each chunk instead of the chunks being collected.
Updated dependencies [36802d4]
Updated dependencies [e0143b0]
Updated dependencies [934100c]
Updated dependencies [892af4d]
Updated dependencies [41465fd]
Updated dependencies [9754014]
Updated dependencies [4bb73b0]
Updated dependencies [2e44144]
fa15312: Raise the minimum Undici version to 7.29.1 to include the fix for CVE-2026-84961.
51ca5b7: fix(provider-utils): support cross-realm Uint8Array and ArrayBuffer in uint8-utils and inline file data conversion
stringifyWithBigIntAndCycles for provider tool serialization that converts BigInt values to decimal strings and replaces ancestor cycles while preserving shared references and toJSON behavior.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.
5c247e9: feat(sandbox): add stat, listDirectory, and deleteFile to Experimental_SandboxSession, and specify that relative paths in every method resolve against the directory run and spawn start in
The just-bash and Vercel Sandbox adapters implement the new methods. Both now resolve a relative workingDirectory for run and spawn against the sandbox's working directory, and the just-bash adapter rejects writes to a directory instead of replacing it with a file.
Updated dependencies [dcd2f8d]
61a315e: fix: map the top-level reasoning option consistently across providers
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.
57086ff: chore(provider-utils): export types for Experimental_SandboxSession's method inputs
Experimental_SandboxSession's method inputsExperimental_SandboxSession's spawn() method to support optional stdin arg for a process with writable input streame64ed82: use native Buffer base64 encoding when available. encoding a Uint8Array backed by a detached ArrayBuffer now throws a TypeError in runtimes w
Uint8Array backed by a detached ArrayBuffer now throws a TypeError in runtimes with Buffer instead of returning an empty stringe729d58: chore(docs): update README.md for consistent format and to avoid duplication
README.md for consistent format and to avoid duplication8202f5b: feat(gateway): implement experimental streaming speech in the gateway provider
8202f5b: feat(gateway): implement experimental streaming speech in the gateway provider
GatewaySpeechModel implements Experimental_StreamingSpeechModelV4 and streams speech over the AI Gateway speech WebSocket (/speech-model, ai-gateway-speech.v1 subprotocol). @ai-sdk/provider-utils adds the experimental speech-stream envelope (experimental_parseSpeechStreamClientFrame, experimental_serializeSpeechStreamPart, experimental_parseSpeechStreamPart) shared by clients and servers, plus the EXPERIMENTAL_SPEECH_STREAM_* frame type constants and Experimental_SpeechStream* frame types. Text-delta frames carry each text part's voice and providerOptions; the start frame carries outputFormat as an audio format object. Adds gateway.experimental_speech, callable like speech(modelId), with a server-side getToken() that mints a speech-bound short-lived client secret for browser use.
Updated dependencies [85d84a1]
### Patch Changes - Updated dependencies [10026d1] - @ai-sdk/provider@4.0.32
b089ce8: Block .internal hostnames in download URL validation.
.internal hostnames in download URL validation.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.### Patch Changes - Updated dependencies [60cc252] - @ai-sdk/provider@4.0.30
0957554: Add box decision question type with image bounds for TypeSafe AI.
box decision question type with image bounds for TypeSafe AI.### Patch Changes - Updated dependencies [130e871] - @ai-sdk/provider@4.0.28
2e89fa4: fix(provider-utils): keep case-sensitive url paths and query values
9667bf2: docs(provider-utils): clarify how ToolApprovalResponse.reason is handled for approved and denied tool calls
ToolApprovalResponse.reason is handled for approved and denied tool calls### Patch Changes - Updated dependencies [4dbc902] - @ai-sdk/provider@4.0.26
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]
### Patch Changes - Updated dependencies [d3bcad9] - @ai-sdk/provider@4.0.24
fc1e19e: fix: limit jsonl rows to 64mb during batch result downloads
fc1e19e: fix: limit jsonl rows to 64mb during batch result downloads
5094ebd: fix(provider-utils): preserve parallel tool calls when stream labels are missing or reused
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 [268225c]
2959d35: feat: rename evaluate to decide
evaluate to decide8c65988: feat(ai): add telemetry to speech generation and transcription, including provider usage propagation and experimental streaming lifecycle cal
isValidHostnamePartede5b89: chore: migrate package builds from tsup to tsdown
c2511c1: fix: use standards-compliant User-Agent header
e3605f6: Fix streamed tool calls with missing, blank, or repeated IDs.
af9597b: Compile packages for ES2022 runtime target
fe07867: Fix Google embedMany calls with more than 100 values by keeping per-value multimodal content aligned across automatic batches, including text
fe07867: Fix Google embedMany calls with more than 100 values by keeping per-value multimodal content aligned across automatic batches, including text-only entries. Validate content length before sending requests and validate each batch's provider options after middleware transforms them.
a4b0940: fix(ai): execute manually approved tool inputs produced by schema transforms
Preserve approved inputs during revalidation and reject histories whose reconstructed schema output differs, including signed approvals with missing original input. Validate transformed UI tool inputs against the reconstructed output before returning them as static tool parts.
771e74b: chore: enable dead code lint rules
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
### Patch Changes - Updated dependencies [2ebc78b] - Updated dependencies [cb4fa52] - @ai-sdk/provider-utils@5.0.80 - @ai-sdk/provider@4.0.38
215b25e: Default language-model evaluation adapters to reasoning: 'none', using each provider's existing reasoning mapping. Explicit reasoning setting
reasoning: 'none', using each provider's existing reasoning mapping. Explicit reasoning settings in providerOptions continue to override the default.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.91c2128: feat(ai): add mid conversation tool discovery/updates for code-mode
### Patch Changes - Updated dependencies [5c0054d] - Updated dependencies [39535af] - @ai-sdk/provider@4.0.15
Updated dependencies [ 6400cf8 ]
892af4d : feat (provider/xai): implement server-side realtime extensions
892af4d: feat (provider/xai): implement server-side realtime extensions
XaiRealtimeModel now implements getServerWebSocketConfig(), returning the upstream voice realtime WebSocket URL (with the model query param) plus header auth derived from the model's configured credentials. Unsupported endpoint intents are rejected. The event mapper now populates normalized usage on response-done and input-transcription-completed using xAI's OpenAI-compatible realtime wire shape.
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.
2e44144: Support typed output.uploadUrl delivery for video generation, editing, and extension. Polling returns an explicit uploaded outcome without downloading or exposing the signed destination, including in request errors. Use camelCase output.uploadUrl instead of raw output.upload_url passthrough; the new option rejects null and requires an HTTPS URL.
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]
Updated dependencies [ fa15312 ]
9e1d1b2: chore(provider-utils): fix test that can timeout
6bcc0f8: Update Undici to a version patched for CVE-2026-13697.
f5fc6ba: Derive known model ID suggestions from each provider's model catalog declarations so catalog updates automatically update autocomplete, while
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### Patch Changes - Updated dependencies [6d50947] - @ai-sdk/provider-utils@5.0.81
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.
Updated dependencies [7716e18]
Updated dependencies [5c247e9]
Updated dependencies [dcd2f8d]
d5440b3: Add web grounding and page freshness options to decision models, and expose search evidence, fetched pages, and tool invocation counts in pro
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]
### Patch Changes - Updated dependencies [2ebc78b] - Updated dependencies [cb4fa52] - @ai-sdk/provider-utils@5.0.80 - @ai-sdk/provider@4.0.38
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.e729d58 : chore(docs): update README.md for consistent format and to avoid duplication
Updated dependencies [ 8202f5b ]
43ad966 : Report interrupted when a stream ends cleanly without its provider completion signal, preserving partial output without emitting an error so
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.
Updated dependencies [ 0c2a9de ]
81cd026: Reduce bundle size by making internal Zod v4 imports tree-shakeable.
Updated dependencies [ 0957554 ]
Updated dependencies [ 130e871 ]
Updated dependencies [ 2e89fa4 ]
Updated dependencies [ 9667bf2 ]
160ccdb: Reduce bundle size by removing the runtime Zod 3 dependency.
Patch Changes Updated dependencies [9184a35] @ai-sdk/provider@4.0.25 @ai-sdk/provider-utils@5.0.57
5fc7da5: chore: centralize empty language model usage creation in provider utilities.
Updated dependencies [ d3bcad9 ]
One column per month.