NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm
npm, #1825 most downloaded on npm
Latest stable
4.0.39
Last release 5 days ago
17 Nov 2026
Ships on a steady schedule
a new release about every 1 weeks
Nearly every release is documented
notes for 55 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
3 years old
207 releases · first in 2024
Drag across the ruler to compare, or tap a release to open it.
10ff0b1: add extraction model support to provider registries, custom providers and string model ids
cb4fa52: add experimental extract api and extraction model spec
c70adf6: Fix TypeSafe decision requests with primitive JSON state by serializing those values as text, reject empty criteria and null or undefined Sco
Your coding agent can read these notes before it upgrades. Set up the MCP server →
36802d4: Support native URL transcription with an optional provider capability, keeping existing file-generation contracts unchanged. Groq sends HTTP(
36802d4: Support native URL transcription with an optional provider capability, keeping existing file-generation contracts unchanged. Groq sends HTTP(S) audio URLs through its url parameter without downloading and re-uploading them, avoiding the attachment upload limit. Supplying a custom download function retains local download behavior.
For telemetry integrations, TranscriptionEndEvent.audio.byteLength and audio.mediaType can now be undefined when a provider fetches the audio URL natively. Check for missing values before using them as a number or string. Downloaded and inline audio continue to report their metadata; streaming transcription metadata is unchanged.
Strip media fragments before sending URLs to Groq. If Groq rejects a redirect, fall back to the existing secure local downloader and file upload rather than failing previously working URL inputs. Other provider errors are preserved.
e0143b0: feat(ai): support provider-owned realtime transports
Add an optional createTransport interface and provider connection capability.
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): add server-side realtime extensions to the experimental RealtimeModelV4 spec
Extends the existing optional getServerWebSocketConfig() method and a normalized usage field so a trusted server/proxy can drive realtime providers the way it drives HTTP language models:
getServerWebSocketConfig({ intent? }) returns the upstream WebSocket { url, headers, protocols? } for a server-initiated connection (header auth with the long-lived credential). Providers fail fast for unsupported endpoint intents instead of silently falling back. It is the server-side sibling of the browser-only getWebSocketConfig.serializeClientEvent and buildSessionConfig now accept the same optional intent so server-side callers can keep endpoint selection and session serialization aligned.RealtimeModelV4Usage type and optional usage on response-done, input-transcription-completed, and provider custom snapshot events. Gross totals and known modality buckets remain separate, and duration is reported as seconds. Counts are gross (cache-inclusive) with cached portions reported separately so consumers can apply their own billing split without re-parsing raw.RealtimeModelV4ServerConnection and RealtimeModelV4SessionIntent types, exported with the Experimental_ prefix.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.
9754014: Add typed streaming heartbeat parts. Anthropic emits them only with includePings: true (disabled by default), without requiring raw chunks. Core forwards pings through stream retries without storing them as generated content or sending them to UI message streams. Consumers with exhaustive stream-part switches must handle the new ping union variant when upgrading, even when the opt-in is disabled. Typed pings do not flush partial words during stream smoothing.
4bb73b0: Add optional video, reranking and decision sections to model capability catalogs, including support for declaring provider options for these operations.
2e44144: Represent videos delivered directly to caller-managed storage with an explicit uploaded outcome. Video generation reports uploadedVideos without downloading or synthesizing video bytes; access video only when videos is nonempty.
dcd2f8d: Introduce a model entry contract with named capability sections and request configuration. Consolidate the OpenAI and Anthropic model catalog
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 duplication85d84a1: feat(provider): add experimental streaming speech model spec
85d84a1: feat(provider): add experimental streaming speech model spec
Adds Experimental_StreamingSpeechModelV4, a SpeechModelV4 extension with doStream() that takes the input text as a stream of text parts (each with an optional per-part voice and providerOptions) and returns a stream of audio parts, plus Experimental_-prefixed stream option, text part, part, result, and usage types. The stable SpeechModelV4 is unchanged.
10026d1: Add the interrupted finish reason for provider streams that end without a completion signal. Preserve partial output without introducing an e
10026d1: Add the interrupted finish reason for provider streams that end without a completion signal. Preserve partial output without introducing an error solely for interruption, and stop tool execution, agent continuation, and automatic UI follow-ups for interrupted responses, including late tool results and approvals. Provider detection and emission will be added separately.
Compatibility notice: Adding interrupted to the public finish-reason types can break type checking after upgrading, even though this is a patch release. Exhaustive switches (for example, using an assertNever fallback) and mappings such as Record<FinishReason, string> must handle the new value. Update any custom validation or application logic that assumes the existing set of finish reasons is exhaustive.
When providers begin emitting interrupted, a stream ending without a completion signal will preserve partial output and report this finish reason without emitting an error solely for the interruption. Applications that need to detect incomplete responses should check finishReason === 'interrupted' as well as their existing error handling.
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.60cc252: feat(perplexity): add decisions api support
0957554: Add box decision question type with image bounds for TypeSafe AI.
box decision question type with image bounds for TypeSafe AI.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.e57803c: Add an optional shared citation representation to generated text and text-end stream events, separate from retrieved sources. Preserve citati
4dbc902: feat(ai): add a top level 'dimensions' setting for embeddding functions
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.
d3bcad9: feat(provider): report decision refusals as refusal answers
268225c: feat(provider): add a portable max reasoning level with native provider mappings, compatibility coercions, and budget-based fallback support.
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.
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
ede5b89: chore: migrate package builds from tsup to tsdown
525efc5: feat(provider): advertise image model file and mask input support
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.
ffb0e76: fix(provider): preserve opaque file URI strings for provider serialization
a7dd893: Add experimental evaluation model aliases and registry resolution. customProvider accepts evaluationModels, registries expose evaluationModel
customProvider accepts evaluationModels, registries expose evaluationModel, and experimental_evaluate accepts string IDs when an evaluation-capable default provider is explicitly configured. Evaluation never implicitly falls back to Gateway. Model-resolution errors now identify evaluationModel while stable provider contracts remain unchanged.d06bb2a: Allow readonly arrays and objects containing them to be used as JSON values.
experimental_evaluate and the isolated experimental v4 evaluation model specification for Choice, Score, and Boolean questions against shared state. Includes typed answers, optional Choice/Score distributions, required Boolean probabilities, validation, retries, cancellation, and Experimental_EvaluationUnsupportedQuestionTypeError for unsupported questions.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.
5ec21a6: fix: reject unsupported batch request types
9942196: feat: add batch cancel and list APIs
912fb01: feat: add batch cancel and list APIs
a4ba394: feat: support per-request models in batch
5190b67: feat(provider): extend the FilesV4 interface with optional getFileMetadata, downloadFile (streaming), and deleteFile operations, plus abortSi
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-utilsaa45741: fix(provider/anthropic): preserve native message batch request counts in provider metadata and support the full language-model option surface
591d25b: feat: add batch completion webhooks. experimental_startTextBatch accepts a webhookUrl, and the gateway provider registers it through the batc
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.ad6a650: feat(video): allow aspectRatio: 'adaptive' on generateVideo
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.
### Patch Changes - 3469d0c: feat: add batch APIs
79e133c: async APIs for generateVideo (poll, webhook)
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.
1e2f324: feat: add experimental speech translation model specification (Experimental_SpeechTranslationModelV4) and experimental_streamTranslate for st
Experimental_SpeechTranslationModelV4) and experimental_streamTranslate for streaming speech-to-speech translationede5b89: chore: migrate package builds from tsup to tsdown
inputReferences for reference-to-video generation5c5c0f5: Add experimental streaming transcription support for transcription models, including OpenAI gpt-realtime-whisper and xAI WebSocket STT.
gpt-realtime-whisper and xAI WebSocket STT.0274f34: feat (video): add first-class frameImages and inputReferences call options for video generation
frameImages and inputReferences call options for video generationf7d4f01: feat(provider): add support for reasoning-file type for files that are part of reasoning
reasoning-file type for files that are part of reasoning"type": "module"). Consumers using require() must switch to ESM import syntax.generateText and streamText1f509d4: fix(ai): force template check on 'kind' param
176466a: chore(provider): align V4 model return types to have their own definitions across all model interfaces
5c2a5a2: fix(provider): fix v4 spec to not use shared v3 types
9f0e36c: trigger release for all packages after provenance setup
008271d: feat(openai-compatible): emit warning when using kebab-case instead of camelCase
7fc6bd6: Raise minimum supported Node.js version to 22. Supported versions: 22, 24, and 26.
0c4c275: trigger initial canary release
6fd51c0: fix(provider): preserve error type prefix in getErrorMessage
ce769dd: feat(provider): add experimental Realtime API support for voice conversations
Adds first-class support for realtime (speech-to-speech) APIs:
Experimental_RealtimeModelV4 spec in @ai-sdk/provider with normalized event types and factoryopenai.experimental_realtime() / google.experimental_realtime() / xai.experimental_realtime() work in both server and browser.getToken() static method on each provider for server-side ephemeral token creationexperimental_getRealtimeToolDefinitions helper for provider session tool definitionsexperimental_useRealtime hook in @ai-sdk/react returning UIMessage[] (aligned with useChat), with onToolCall and addToolOutput for client-driven tool executioninputAudioTranscription session config for showing transcribed user audio messages when supported by the providere311194: feat(ai): allow passing provider instance to uploadFile and uploadSkill as shorthand
258c093: chore: ensure consistent import handling and avoid import duplicates or cycles
b8396f0: trigger initial beta release
0416e3e: feat (video): add first-class generateAudio call option
ff5eba1: feat: roll image-* tool output types into their equivalent file-* types
ce769dd: feat(provider): add experimental Realtime API support for voice conversations
ce769dd: feat(provider): add experimental Realtime API support for voice conversations
Adds first-class support for realtime (speech-to-speech) APIs:
Experimental_RealtimeModelV4 spec in @ai-sdk/provider with normalized event types and factoryopenai.experimental_realtime() / google.experimental_realtime() / xai.experimental_realtime() work in both server and browser.getToken() static method on each provider for server-side ephemeral token creationexperimental_getRealtimeToolDefinitions helper for provider session tool definitionsexperimental_useRealtime hook in @ai-sdk/react returning UIMessage[] (aligned with useChat), with onToolCall and addToolOutput for client-driven tool executioninputAudioTranscription session config for showing transcribed user audio messages when supported by the provider7fc6bd6: Raise minimum supported Node.js version to 22. Supported versions: 22, 24, and 26.
5463d0d: feat(provider): align tool result output content file part types with top-level message file part types
0c4c275: trigger initial canary release
0416e3e: feat (video): add first-class generateAudio call option
generateAudio call optionb8396f0: trigger initial beta release
9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type
9f0e36c: trigger release for all packages after provenance setup
ff5eba1: feat: roll image-* tool output types into their equivalent file-* types
image-* tool output types into their equivalent file-* typesef992f8: Remove CommonJS exports from all packages. All packages are now ESM-only ("type": "module"). Consumers using require() must switch to ESM imp
"type": "module"). Consumers using require() must switch to ESM import syntax.176466a: chore(provider): align V4 model return types to have their own definitions across all model interfaces
e311194: feat(ai): allow passing provider instance to uploadFile and uploadSkill as shorthand
uploadFile and uploadSkill as shorthand34bd95d: feat(ai): add support for uploading provider skills using the provider references abstraction
6fd51c0: fix(provider): preserve error type prefix in getErrorMessage
c29a26f: feat(provider): add support for provider references and uploading files as supported per provider
1f509d4: fix(ai): force template check on 'kind' param
3887c70: feat(provider): add new top-level reasoning parameter to spec and support it in generateText and streamText
generateText and streamText776b617: feat(provider): adding new 'custom' content type
f7d4f01: feat(provider): add support for reasoning-file type for files that are part of reasoning
reasoning-file type for files that are part of reasoning5c2a5a2: fix(provider): fix v4 spec to not use shared v3 types
One column per month.