unstale

npm / ai

ai

What changed in ai 5 to 7, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-17.

22 breaking9 security2 deprecations65 new APIs and options1 performance33 behavior and defaults146 fixes and other

ai 7243 changes

Breaking changes 17

  • Public state forms are normalized into parts before providers are called, with text and JSON objects mapped to text and json parts.

    7.0.133release notes

  • Arrays passed directly as state are interpreted as decision state parts; JSON arrays must be wrapped.

    7.0.133release notes

  • TypeSafe AI rejects file inputs in decision state.

    7.0.133release notes

  • The evaluate API was renamed to decide.

    7.0.128release notes

  • Undetermined generated audio formats now throw InvalidResponseDataError instead of a generic Error.

    7.0.128release notes

  • Provider-executed tool errors bypass the UI stream onError callback, while stream errors and invalid tool calls still invoke it.

    6.0.297, 7.0.122release notesrelease notes

  • Together AI Gemini image inputs are marked unsupported by the current single-image request mapping.

    7.0.119release notes

  • Packages are compiled for an ES2022 runtime target, which may affect the runtime environment required by developers.

    7.0.116release notes

  • URL MIME types are matched exactly so unsupported subtypes are not forwarded to providers.

    7.0.116release notes

  • Histories whose reconstructed schema output differs are rejected, including signed approvals with missing original input.

    7.0.113release notes

  • addToolOutput now rejects continuous sessions.

    7.0.102release notes

  • sendTextMessage now rejects continuous sessions.

    7.0.102release notes

  • Utility input validation now uses InvalidArgumentError, changing the error developers may need to handle.

    7.0.99release notes

  • Unsupported batch request types are now rejected.

    7.0.98release notes

  • Embedding model responses containing no embeddings are now rejected.

    5.0.259, 6.0.284, 7.0.95release notesrelease notesrelease notes

  • Batch operations now support selecting models per request.

    7.0.94release notes

  • Tool execution no longer starts automatically when a model call ends with an unsafe finish reason.

    5.0.241, 6.0.260, 7.0.70release notesrelease notesrelease notes

Security 7

  • Unavailable tools no longer expose persisted output to models.

    5.0.273, 7.0.129release notesrelease notes

  • Default stream reconnection URLs encode chat IDs, reject standalone dot IDs, and preserve custom URLs unchanged.

    5.0.270, 6.0.297, 7.0.122release notesrelease notesrelease notes

  • Tracing-channel context is now filtered according to telemetry allowlists.

    7.0.114release notes

  • URL-backed language model file outputs are securely downloaded and expose actual base64 and byte content, with valid data URLs in UI streams.

    7.0.111release notes

  • Prevents direct execution of tools governed by tool callers.

    7.0.108release notes

  • Default Node.js downloads retain DNS validation and connection pinning when global fetch is wrapped before or after SDK loading.

    5.0.271, 6.0.298, 7.0.103release notesrelease notesrelease notes

  • Prevents streamText from executing tool calls that violate tool choice.

    7.0.94release notesrelease notes

Deprecations 2

  • Deprecation warnings now use stable codes and are deduplicated.

    7.0.129release notes

  • rawInput is deprecated in output-error UI message parts.

    7.0.103release notes

New APIs and options 61

  • Adds configurable concurrency for tool call execution.

    7.0.140release notes

  • Adds an optional shared citation representation across generated text, stream events, result content, and UI message text parts.

    7.0.138release notes

  • Embedding functions accept a new top-level dimensions setting.

    7.0.135release notes

  • Adds persistent WebSocket chat transport with correlated streaming, backpressure, cancellation, protocol validation, lifecycle handling, and sequence-based resume support.

    7.0.135release notes

  • Experimental decision state now supports ordered text, file, and JSON parts.

    7.0.133release notes

  • OpenAI Decisions and language model adapters now support image input.

    7.0.133release notes

  • Introduces a callback for persisting messages when a UI message step ends.

    7.0.132release notes

  • Adds portable max reasoning with native provider mappings, compatibility coercions, and budget-based fallback support.

    7.0.129release notes

  • ReasoningLevel now includes max, so exhaustive switches and Record mappings must handle the new value.

    7.0.129release notes

  • extractReasoningMiddleware supports custom reasoning delimiters.

    7.0.128release notes

  • WorkflowAgent gains durable non-streaming generation with a shared tool loop, typed output, and a 20-step default.

    7.0.128release notes

  • Tool search can select and rank eligible deferred tools through a search callback.

    7.0.127release notes

  • Tool search supports configuring the maximum number of returned tools.

    7.0.127release notes

  • Experimental streaming lifecycle callbacks were added for speech generation and transcription.

    7.0.124release notes

  • File-input support is advertised for QuiverAI Arrow 2 and Arrow 2 Telos.

    7.0.119release notes

  • Single-image editing capability is included for Together AI FLUX.2 Pro and Flex.

    7.0.119release notes

  • Gemini TTS supports explicit A-law output.

    7.0.113release notes

  • Gemini 3.8 TTS support adds structured speech metadata and per-turn speaker and style controls for prebuilt voices.

    7.0.113release notes

  • Gemini TTS supports explicit mu-law output.

    7.0.113release notes

  • Gemini TTS supports explicit raw PCM output.

    7.0.113release notes

  • customProvider now accepts evaluationModels for experimental evaluation model aliasing and registry resolution.

    7.0.104release notes

  • Registries now expose evaluationModel for evaluation-capable model resolution.

    7.0.104release notes

  • Adds a native tool search tool for applications that need tool discovery.

    7.0.104release notes

  • Adds experimental evaluation of Choice, Score, and Boolean questions against shared state with typed answers and validation.

    7.0.103release notes

  • Adds an error for unsupported evaluation question types.

    7.0.103release notes

  • Applications exchange WebRTC SDP through an application endpoint using api.session.

    7.0.102release notes

  • Experimental client-delegated Live conversations can use browser-direct WebRTC alongside the existing WebSocket path.

    7.0.102release notes

  • The unified factory adds experimental OpenAI Live provider support for server WebSocket sessions with client delegation.

    7.0.102release notes

  • An OpenAI-specific api override is available for early-access models.

    7.0.102release notes

  • Typed AI SDK errors are exposed for UI transport and completion failures.

    7.0.100release notes

  • Image generation requests are now supported in batches.

    7.0.98release notes

  • A type guard for tool output errors was added alongside a stable UI message type.

    7.0.98release notes

  • A stable UI message type and a type guard for tool output errors were added.

    7.0.98release notes

  • Batch cancellation and listing APIs were added for managing batches.

    7.0.97release notes

  • Adds an API for canceling batches.

    7.0.96release notes

  • Adds an API for listing batches.

    7.0.96release notes

  • Array outputs now support maxItems constraints.

    7.0.93release notes

  • Array outputs now support minItems constraints.

    7.0.93release notes

  • onLanguageModelCallStart is formally included in the ToolLoopAgentSettings type.

    7.0.93release notes

  • Adds configurable recovery for provider errors after response streaming begins, with isolated retry attempts and successful-attempt-only results and metadata.

    7.0.91release notes

  • Adds a bounded callback-directed recovery path for streamed provider errors when streamRetries is configured to 0.

    7.0.91release notes

  • Upload results now expose the uploaded file size.

    7.0.89release notes

  • Provider-utils adds a handler for binary stream responses.

    7.0.89release notes

  • Upload results now expose the file creation timestamp.

    7.0.89release notes

  • FilesV4 now supports optionally deleting files.

    7.0.89release notes

  • FilesV4 now supports optional streaming file downloads.

    7.0.89release notes

  • Upload results now expose the file expiration timestamp.

    7.0.89release notes

  • FilesV4 operations can receive an abort signal for cancellation.

    7.0.89release notes

  • FilesV4 operations can receive custom request headers.

    7.0.89release notes

  • FilesV4 now supports optionally retrieving file metadata.

    7.0.89release notes

  • Provider-utils adds streaming multipart uploads with deterministic part ordering and failure-path stream teardown.

    7.0.89release notes

  • Uploads can use a stream data variant for streaming uploads.

    7.0.89release notes

  • Batch operations now support tool calling.

    7.0.88release notes

  • WorkflowAgent now supports signed tool approvals.

    7.0.86release notes

  • Anthropic batch requests now support the full language-model option surface.

    7.0.85release notes

  • Individual image generation calls are now exposed for direct use.

    7.0.85release notes

  • UI message stream end callbacks now provide operation-level outcomes.

    5.0.249, 6.0.271, 7.0.83release notesrelease notesrelease notes

  • UI messages retain the optional approval request reason separately from an approver's response reason.

    7.0.82release notes

  • Manual tool approval statuses can include a reason that is preserved across core, model, and UI approval requests.

    7.0.82release notes

  • The gateway provider registers batch completion webhooks through the batch callbackUrl contract.

    7.0.79release notes

  • Batch completion webhooks can be configured with a webhook URL.

    7.0.79release notes

Behavior and default changes 29

  • Streamed custom-tool input is marked as text so UI clients can display it progressively without JSON parsing.

    7.0.142release notes

  • A warning is logged when the default step limit stops a tool loop.

    7.0.135release notes

  • Model-call spans now record normalized state parts, while outer spans retain public state inputs.

    7.0.133release notes

  • Decision file bytes are serialized as base64 in OpenTelemetry state attributes.

    7.0.133release notes

  • Shared state is labeled in language-model decision prompts.

    7.0.133release notes

  • Decision refusals are reported as refusal answers.

    7.0.130release notes

  • Portable minimal, xhigh, and max retain or receive provider mappings and now return compatibility warnings.

    7.0.129release notes

  • Speech generation and transcription now include telemetry and provider usage propagation.

    7.0.124release notes

  • Provider capability declarations advertise file and mask input support using confirmed model IDs.

    7.0.119release notes

  • Newer and custom model IDs default to structured speech, while legacy formats remain for older models.

    7.0.113release notes

  • UI message stream end callbacks now report consumer cancellation.

    7.0.112release notes

  • Adds telemetry support to experimental_evaluate.

    7.0.111release notes

  • Accepts string model IDs when an evaluation-capable default provider is explicitly configured; evaluation does not implicitly fall back to Gateway.

    7.0.104release notes

  • Tool search now supports direct tool calling.

    7.0.104release notes

  • Code-mode can discover and update tools during a conversation.

    7.0.103release notes

  • Live continuous sessions enforce 128 KiB frame and combined buffered-send budgets using actual encoded wire bytes.

    7.0.102release notes

  • Known Live model IDs route to Live, while unknown IDs retain legacy Realtime defaults.

    7.0.102release notes

  • maxPlaybackBufferSeconds is supported only for continuous PCM sessions.

    7.0.102release notes

  • Runtime context attribution was added to embed, embedMany, and rerank operations.

    7.0.98release notes

  • Runtime context attribution was added to embed, embedMany, and rerank operations.

    7.0.98release notes

  • Runtime context attribution was added to embed, embedMany, and rerank operations.

    7.0.98release notes

  • Google and Google Vertex prompt blocks are now treated as terminal.

    7.0.94release notes

  • Retryability classification is provider-independent and preserved through the AI Gateway.

    5.0.255, 6.0.280, 7.0.94release notesrelease notesrelease notes

  • The core uploadFile helper now forwards abortSignal and headers options.

    7.0.89release notes

  • Parsed structured output is now exposed in streamText end callbacks.

    6.0.273, 7.0.84release notesrelease notes

  • Chats can continue automatically after tool approval denials reach the output-denied state.

    6.0.270, 7.0.83release notesrelease notes

  • OPA requires-approval decisions now surface their reason to human approvers.

    7.0.82release notes

  • Preliminary tool outputs are filtered when ignoreIncompleteToolCalls is enabled.

    5.0.241, 6.0.260, 7.0.70release notesrelease notesrelease notes

  • Chat status remains submitted until response content begins streaming.

    6.0.255, 7.0.66release notesrelease notes

Fixes and other changes 127

  • Raw OpenAI custom-tool input deltas are restored for consumers forwarding them to Responses API clients.

    6.0.308, 7.0.142release notesrelease notes

  • The text encoding is preserved when partial UI messages are saved and resumed.

    6.0.308, 7.0.142release notesrelease notes

  • Workflow now passes runtime context when telemetry.includeRuntimeContext allows it.

    7.0.141release notes

  • Rejects approved tool calls without results before sending later context to providers.

    6.0.304, 7.0.138release notesrelease notes

  • Fixes validation of rounded choice probabilities.

    7.0.138release notes

  • Prevents duplicate message parts when replayed streams are resumed.

    6.0.304, 7.0.138release notesrelease notes

  • Reports incomplete model streams with no output as errors.

    7.0.138release notes

  • Updates streaming chat messages by stable ID.

    5.0.274, 6.0.304, 7.0.138release notesrelease notesrelease notes

  • Updates tool outputs in the message containing the matching tool call.

    5.0.274, 6.0.304, 7.0.138release notesrelease notesrelease notes

  • Prevents a second resume request on mount when a chat is already submitted or streaming.

    5.0.274, 6.0.304, 7.0.138release notesrelease notesrelease notes

  • Discards unrelated message state when reading resumed streams.

    5.0.274, 6.0.303, 7.0.137release notesrelease notesrelease notes

  • chunkMs and firstChunkMs stop when model responses end, retries receive fresh timeout budgets, and stepMs still covers local tools.

    7.0.136release notes

  • Stopping now waits for chat stream cleanup to complete.

    5.0.274, 6.0.303, 7.0.135release notesrelease notesrelease notes

  • Repeated tool approval responses no longer trigger duplicate continuation requests.

    7.0.135release notes

  • Provider-executed tool calls are preserved when streams are resumed.

    7.0.134release notes

  • Async sendAutomaticallyWhen failures from tool updates are now propagated.

    7.0.134release notes

  • Gateway keeps its existing string and JSON request format and rejects file inputs.

    7.0.133release notes

  • Pending result promises are rejected and pending streams are canceled when the abort signal fires.

    7.0.130release notes

  • Nova 2 portable xhigh now sends maxReasoningEffort high instead of max and returns a compatibility warning.

    7.0.129release notes

  • Chat reconnect URLs no longer contain duplicate slashes.

    5.0.273, 6.0.302, 7.0.129release notesrelease notesrelease notes

  • Provider options are now preserved from approval-only tool messages.

    7.0.129release notes

  • V2 provider-reported total tokens are now preserved in raw usage.

    6.0.302, 7.0.129release notesrelease notes

  • The latest error is now published after repeated failed stream resume attempts.

    6.0.302, 7.0.129release notesrelease notes

  • WebKit network errors are now recognized.

    7.0.129release notes

  • Silent audio now returns successful empty transcripts.

    7.0.128release notes

  • Tool approval state is preserved when resuming streams.

    7.0.128release notes

  • Tool approval inputs created in another JavaScript realm are accepted when unchanged.

    7.0.127release notes

  • Merged UI message streams are canceled when the consumer disconnects.

    7.0.127release notes

  • Tool approvals are cleared when addToolOutput runs.

    7.0.126release notes

  • Partial reasoning tags are preserved when streamed text parts end.

    7.0.123release notes

  • Pending tool approvals superseded by user messages are ignored.

    7.0.123release notes

  • All tool content is pruned when retaining zero trailing messages.

    7.0.123release notes

  • Idle UI message streams remain open through optional SSE heartbeats.

    5.0.270, 6.0.297, 7.0.123release notesrelease notesrelease notes

  • Active UI message parts now continue when resuming after a disconnect.

    5.0.268, 6.0.295, 7.0.120release notesrelease notesrelease notes

  • Tool metadata is now preserved from tool output chunks.

    6.0.296, 7.0.120release notesrelease notes

  • Response streams are canceled when clients disconnect.

    5.0.268, 6.0.294, 7.0.119release notesrelease notesrelease notes

  • Static tool input errors are stored in the current input field.

    7.0.119release notes

  • Unhandled stream completion rejections are prevented in non-Node runtimes.

    7.0.119release notes

  • Original opaque URI strings are preserved in tagged file URLs during prompt conversion.

    7.0.116release notes

  • Google embedMany calls with more than 100 values now preserve multimodal alignment across automatic batches.

    7.0.113release notes

  • Content length is validated before Google embedding requests are sent.

    7.0.113release notes

  • Each automatic batch validates provider options after middleware transforms them.

    7.0.113release notes

  • Headerless audio formats are identified correctly.

    7.0.113release notes

  • Direct transport stream callbacks now preserve message history.

    7.0.113release notes

  • Empty speech transcripts are rejected before requests are sent.

    7.0.113release notes

  • Completed streamed tool input callbacks are routed to repaired tools.

    7.0.113release notes

  • Tool approvals can resume from earlier messages.

    6.0.290, 7.0.113release notesrelease notes

  • Manually approved tool inputs produced by schema transforms are executed while preserving approved inputs during revalidation.

    6.0.290, 7.0.113release notesrelease notes

  • Transformed UI tool inputs are validated against reconstructed output before returning them as static tool parts.

    7.0.113release notes

  • Video models are preserved when using legacy fallback providers.

    7.0.113release notes

  • Native WAV responses are preserved without adding a second header.

    7.0.113release notes

  • Opaque file URI strings are preserved during provider serialization.

    5.0.264, 6.0.289, 7.0.112release notesrelease notesrelease notes

  • UI message validation now preserves parsed metadata and data values.

    5.0.265, 6.0.290, 7.0.112release notesrelease notesrelease notes

  • Reasoning file parts are now pruned when reasoning is removed.

    7.0.112release notes

  • Cancellation is propagated to batch file downloads.

    7.0.111release notes

  • Reasoning extraction streams now preserve overlapping text blocks.

    7.0.109release notes

  • Replacement completion requests remain loading and cancellable when an earlier request settles.

    7.0.109release notes

  • Validated toolsContext is forwarded to host-executed tools in alignment with ToolLoopAgent.

    7.0.109release notes

  • Stops pending tool-call repairs when generation is cancelled.

    7.0.108release notes

  • Preserves file data when adapting v3 language models.

    7.0.108release notes

  • Base64 text data URLs are decoded using their declared charset.

    7.0.107release notes

  • Query parameters are preserved in chat reconnect URLs.

    7.0.107release notes

  • Chat transport requests no longer include duplicate content types.

    5.0.264, 6.0.289, 7.0.107release notesrelease notesrelease notes

  • Input callbacks receive tool-specific context.

    7.0.107release notes

  • Preliminary tool outputs no longer complete chats prematurely.

    6.0.289, 7.0.107release notesrelease notes

  • Raw speech audio format metadata is preserved.

    7.0.107release notes

  • Node stream responses preserve multiple Set-Cookie headers.

    7.0.107release notes

  • Polling timeouts are enforced for in-flight video status requests.

    7.0.107release notes

  • WorkflowAgent supports deferred tool discovery.

    7.0.107release notes

  • Provider file and skill upload APIs are preserved when using wrapProvider.

    7.0.107release notes

  • Input available callbacks are skipped for invalid streamed tool calls.

    7.0.106release notes

  • Null and empty-string JSON partial outputs are now streamed.

    6.0.286, 7.0.106release notesrelease notes

  • onEnd is no longer called after aborting a multi-step text stream.

    7.0.106release notes

  • Streamed step results now report the model selected by prepareStep.

    6.0.286, 7.0.106release notesrelease notes

  • Prompt attachment downloads are canceled when model calls are aborted or time out.

    6.0.286, 7.0.106release notesrelease notes

  • Provider metadata is preserved when simulating text streams.

    5.0.260, 6.0.286, 7.0.106release notesrelease notesrelease notes

  • Serialized tool outputs now preserve properties named after object prototypes.

    7.0.106release notes

  • Streamed JSON fences are stripped before arbitrary trailing whitespace.

    7.0.106release notes

  • Streamed response metadata fallbacks now use the model selected by prepareStep.

    7.0.106release notes

  • Structured output is streamed from the final tool-loop step.

    6.0.286, 7.0.106release notesrelease notes

  • Telemetry spans are closed when provider response streams fail.

    7.0.106release notes

  • Tool calls required by retained pending approvals are preserved.

    6.0.286, 7.0.106release notesrelease notes

  • Unhandled rejections are prevented when reading a UI message stream stops early.

    5.0.261, 6.0.286, 7.0.106release notesrelease notesrelease notes

  • Evaluation model IDs are resolved through AI Gateway when no default provider is configured, including string aliases in custom providers.

    7.0.105release notes

  • Abnormal realtime WebSocket close diagnostics are now reported through onError.

    7.0.104release notes

  • Oversized manual operations remain recoverable, while startup and automatic audio failures close the session.

    7.0.102release notes

  • Abnormal realtime WebSocket close codes and reasons are reported through the session error path.

    7.0.102release notes

  • Automatically denied tool calls in UI streams now settle instead of remaining unresolved.

    7.0.102release notes

  • Tool output JSON values are now serialized.

    7.0.101release notes

  • Invalid reranking provider indices are now rejected.

    6.0.284, 7.0.98release notesrelease notes

  • validateUIMessages now accepts inferred tools.

    7.0.98release notes

  • Receiver rejections are observed before generation starts, preventing unhandled rejections while preserving start error precedence.

    7.0.97release notes

  • Calls atob without a receiver for Cloudflare Workers compatibility.

    6.0.280, 7.0.96release notesrelease notes

  • Unclassified empty image results are retried.

    5.0.255, 6.0.280, 7.0.94release notesrelease notesrelease notes

  • Retry-attempt accounting is preserved during result retries.

    7.0.94release notes

  • Abort signals are supported when the global AbortSignal is not a constructor.

    7.0.93release notes

  • Embedding responses are rejected when their count does not match the input values.

    7.0.93release notes

  • Image call diagnostics are preserved when no image is generated.

    7.0.93release notes

  • Provider metadata is preserved when failed tool calls are converted.

    6.0.287, 7.0.93release notesrelease notes

  • Replacing a message in sendMessage now uses a new message ID.

    7.0.93release notes

  • Text data URLs are now decoded in Node.js.

    5.0.255, 6.0.279, 7.0.93release notesrelease notesrelease notes

  • onLanguageModelCallEnd is formally included in the ToolLoopAgentSettings type.

    7.0.93release notes

  • Tool part titles are preserved when UI messages are validated.

    7.0.93release notes

  • Fallback errors are surfaced when HTTP responses have empty bodies.

    7.0.92release notes

  • Skips smoothStream delays while the document is hidden.

    5.0.252, 6.0.276, 7.0.92release notesrelease notesrelease notes

  • Provider metadata stays on corresponding smoothStream chunks without carrying into later metadata-free deltas.

    5.0.269, 6.0.276, 7.0.92release notesrelease notesrelease notesrelease notes

  • onAbort callbacks now expose the call ID and abort reason.

    7.0.92release notes

  • generateText no longer accepts responses that violate required tool choices.

    7.0.88release notes

  • Approval descriptors are preserved in UI message streams.

    6.0.274, 7.0.87release notesrelease notes

  • Canonical hashes now preserve the positions of undefined elements in arrays.

    7.0.85release notes

  • Gateway now sums image-generation costs across split requests.

    7.0.85release notes

  • Anthropic provider metadata now preserves native message batch request counts.

    7.0.85release notes

  • Tool approval secrets are now allowed in prepareCall.

    7.0.84release notes

  • smoothStream now handles stateful and empty-match regular expressions.

    7.0.84release notes

  • Tool approval secrets are now allowed in ToolLoopAgent settings.

    7.0.84release notes

  • Stream cancellation is handled when it occurs before an inner stream is registered.

    6.0.270, 7.0.83release notesrelease notes

  • Persisted typed tool calls are validated against current schemas, with incompatible history loaded as dynamic tool parts.

    5.0.250, 6.0.271, 7.0.83release notesrelease notesrelease notes

  • Structured output is parsed when providers return text without a finishReason.

    7.0.79release notes

  • Active text and reasoning parts are preserved when another merged UI message stream finishes a step.

    7.0.79release notes

  • Continues approved generateText, streamText, and WorkflowAgent turns with a model-visible tool error when revalidated tool input is invalid.

    7.0.78release notes

  • Allows nullish metadata schemas for UI messages with branded IDs.

    7.0.76release notes

  • Prevents duplicate IDs for text and reasoning parts.

    6.0.264, 7.0.76release notesrelease notes

  • Exceptions in streaming onChunk and onError callbacks no longer terminate the stream or mask provider errors.

    7.0.71release notes

  • Multi-step text generation now stops for client tool approval when a provider-executed tool has a deferred result.

    7.0.70release notes

  • Result promises are rejected and failed completion is reported when the provider stream errors.

    5.0.241, 6.0.260, 7.0.70release notesrelease notesrelease notes

  • Partial UI message parts are cleared when a WorkflowAgent model-call step is retried.

    7.0.70release notes

  • Declaration emit now works for exported values that infer an Output type.

    5.0.237, 6.0.255, 7.0.66release notesrelease notesrelease notes

ai 623 changes

Breaking changes 3

  • Automatic chat resumption no longer occurs when completed tool output is followed by terminal text without completed stream state.

    5.0.270, 6.0.297release notesrelease notes

  • Inherited names no longer resolve as registered providers.

    6.0.297release notes

  • Rejects responses that do not satisfy a required or specifically selected tool choice.

    6.0.272release notes

Security 1

  • Unavailable tools, including names matching Object.prototype properties, no longer expose persisted output to models.

    6.0.302release notes

New APIs and options 3

  • Streamed input is marked as text so UI clients can display it progressively without JSON parsing.

    6.0.308release notes

  • Exposes normalized response content for opt-in recovery from tool choice violations.

    6.0.272release notes

  • Allows tool approval secrets in ToolLoopAgent settings and prepareCall.

    6.0.272release notes

Performance 1

  • Avoids repeatedly cloning accumulated text while preserving independent snapshots for mutable nested values.

    5.0.237, 6.0.255release notesrelease notes

Behavior and default changes 1

  • Google and Google Vertex content-filtered results are treated as terminal and are not retried.

    6.0.280release notes

Fixes and other changes 14

  • Final provider tool-call inputs remain JSON-encoded after streamed input uses text encoding.

    6.0.308release notes

  • Prevents global type conflicts when multiple SDK versions are used.

    5.0.274, 6.0.303release notesrelease notes

  • Hydrated partial static tool input is preserved across stream resumptions.

    5.0.270, 6.0.297release notesrelease notes

  • Custom URLs returned by prepareReconnectToStreamRequest remain unchanged.

    5.0.270, 6.0.297release notesrelease notes

  • Prototype-named tools are preserved as own properties without changing lookup object prototypes.

    6.0.297release notes

  • Agent UI streams can use original messages as input.

    6.0.296release notes

  • Preserves media types on tool result file URLs and matches full MIME types exactly when checking native URL support.

    6.0.293release notes

  • Google embedMany now keeps per-value multimodal content aligned across automatic batches and validates content and provider options.

    6.0.290release notes

  • Streamed tool input callbacks now await start and delta callbacks before onInputAvailable on newer Node.js versions.

    5.0.264, 6.0.289release notesrelease notes

  • Retry-attempt accounting is preserved during image-result retries.

    6.0.280release notes

  • Approved turns continue with a model-visible tool error when revalidated tool input is invalid.

    6.0.266release notes

  • Aborted, errored, or cancelled calls no longer retain per-call state through abort cleanup listeners.

    6.0.266release notes

  • Exceptions in streaming onChunk callbacks no longer terminate the stream or mask provider errors.

    5.0.243, 6.0.262release notesrelease notes

  • Exceptions in streaming onError callbacks no longer terminate the stream or mask provider errors.

    6.0.262release notes

ai 512 changes

Breaking changes 2

  • Prototype-named tools and providers are preserved as own properties, while inherited names no longer resolve as registered providers.

    5.0.270release notes

  • createTestServer and TestResponseController are no longer re-exported here; import them from @ai-sdk/test-server/with-vitest instead.

    5.0.245release notes

Security 1

  • Deleted tools named after Object.prototype properties no longer expose persisted output to models.

    5.0.273release notes

New APIs and options 1

  • Exported isDynamicToolUIPart from the ai package, making it available for application code.

    5.0.272release notes

Behavior and default changes 3

  • Diagnostics from completed attempts are preserved, giving developers more information when retries occur.

    5.0.255release notes

  • Google Vertex RAI-filtered results are treated as terminal and are not retried.

    5.0.255release notes

  • OpenAI and Azure OpenAI embedding requests are split by a conservative UTF-8 byte budget derived from aggregate token limits, alongside input count limits.

    5.0.248release notes

Fixes and other changes 5

  • Prototype-named provider metadata no longer causes image metadata aggregation to fail.

    5.0.270release notes

  • Result retryability classification is preserved through the AI Gateway.

    5.0.255release notes

  • Manual continuations can reuse JSON tool outputs containing undefined object properties.

    5.0.253release notes

  • Transient network errors while reading successful response bodies are now marked retryable, including AI Gateway responses.

    5.0.250release notes

  • Mocks now return configured results in order starting with the first call.

    5.0.242release notes