unstale

npm / @ai-sdk/openai

@ai-sdk/openai

What changed in @ai-sdk/openai 1 to 7, from its official release notes, upgrade guides and advisories. Sources checked 2026-12-05.

69 breaking6 security17 deprecations137 new APIs and options1 performance39 behavior and defaults84 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

@ai-sdk/openai 752 changes

Breaking changes 28

  • The package is ESM-only; consumers using require() must switch to ESM import syntax.

    4.0.0, 7.0.0release notesupgrade guide

  • OpenTelemetry span collection moved out of the ai package; install this package and register an OpenTelemetry instance globally to receive traces.

    7.0.0upgrade guide

  • Top-level content, tool-call and result, file, source, and warning properties on generateText and streamText results now accumulate values across every step; use finalStep for previous final-step-only behavior.

    7.0.0upgrade guide

  • Replaces experimental_context in tool callbacks and is now tool-specific, typed from contextSchema, and supplied through toolsContext keyed by tool name.

    7.0.0upgrade guide

  • The deprecated option has been removed; replace remaining usages with activeTools.

    7.0.0upgrade guide

  • The tracer property is removed from experimental_telemetry; pass a custom tracer to the OpenTelemetry constructor instead.

    7.0.0upgrade guide

  • Move the deprecated top-level streamText includeRawChunks option to include.rawChunks.

    7.0.0upgrade guide

  • Request bodies are no longer included in generateText and streamText step results by default; opt in with include.requestBody to read them.

    7.0.0upgrade guide

  • generateText no longer includes response bodies by default; opt in with include.responseBody to read them.

    7.0.0upgrade guide

  • The deprecated function has been removed; replace remaining usages with isToolUIPart.

    7.0.0upgrade guide

  • The deprecated top-level cachedInputTokens field is removed; use inputTokenDetails.cacheReadTokens instead.

    7.0.0upgrade guide

  • The deprecated top-level reasoningTokens field is removed; use outputTokenDetails.reasoningTokens instead.

    7.0.0upgrade guide

  • The redirect option for HTTP and SSE transports now defaults to error rather than follow, rejecting redirects by default to prevent SSRF; set it to follow if redirects are required.

    7.0.0upgrade guide

  • The deprecated tool-result content part type has been removed. Use the file content shape for inline tool-result file content, including images.

    7.0.0upgrade guide

  • The minimum supported Node.js version is raised to 22; supported versions are 22, 24, and 26.

    4.0.0, 7.0.0release notesupgrade guide

  • streamText now calls onChunk for every TextStreamPart, including lifecycle, boundary, and terminal parts; handlers should guard the chunk types they process.

    7.0.0upgrade guide

  • Replaces onEmbedFinish in telemetry integrations and tracing-channel events for individual embedding model calls.

    7.0.0upgrade guide

  • Replaces experimental_onFinish as the per-call completion callback for embed and embedMany operations.

    7.0.0upgrade guide

  • Replaces experimental_onFinish as the per-call completion callback for rerank operations.

    7.0.0upgrade guide

  • Replaces onRerankFinish in telemetry integrations and tracing-channel events for individual reranking model calls.

    7.0.0upgrade guide

  • Replaces onStepFinish as the per-step lifecycle callback across text and object generation, agents, and UI message stream helpers; telemetry integrations should implement onStepEnd.

    7.0.0upgrade guide

  • When reasoning or reasoningEffort is set to a value other than 'none', reasoningSummary now defaults to 'detailed'. Set it to null to keep summaries disabled.

    7.0.0upgrade guide

  • The codemod updates named imports and direct re-exports to new Google API names while preserving local bindings and application export names as aliases; namespace member access remains unchanged.

    7.0.0upgrade guide

  • Shared generation or agent runtime data now flows through runtimeContext, separate from tool-specific context supplied through toolsContext.

    7.0.0upgrade guide

  • Each StepResult now contains only messages produced by that step; use result.responseMessages for the full response message history.

    7.0.0upgrade guide

  • The deprecated type has been removed; replace remaining imports and references with ToolExecutionOptions.

    7.0.0upgrade guide

  • Supply tool-specific context values through toolsContext under the matching tool name; tools declare their fields with contextSchema.

    7.0.0upgrade guide

  • generateText and streamText result usage now reports token usage across all steps; use finalStep.usage for final-step-only usage.

    7.0.0upgrade guide

Deprecations 13

  • The @ai-sdk/vue Chat class is deprecated in favor of the useChat composable, which exposes reactive refs and recreates the underlying chat when its init object changes.

    7.0.0upgrade guide

  • Tool result content should use the canonical file variant with tagged data and mediaType instead of image-* and legacy file-* variants; legacy outputs are runtime-migrated.

    7.0.0upgrade guide

  • Final-step reasoning, request, response, and provider metadata properties are accessed through finalStep; deprecated top-level aliases continue to work in AI SDK 7.

    7.0.0upgrade guide

  • The user-message image content part is deprecated; use a file part with an image mediaType instead.

    7.0.0upgrade guide

  • The needsApproval property on tool() and dynamicTool() is deprecated; move approval logic to toolApproval on the call or agent to keep policy configurable per request.

    7.0.0upgrade guide

  • Replaces onFinish as the final lifecycle callback for generateText, streamText, and agents; onFinish remains a deprecated alias, and onEnd takes precedence when both are provided.

    7.0.0upgrade guide

  • The streamText result method is deprecated; use the top-level stateless helper with a text stream.

    7.0.0upgrade guide

  • The streamText result method is deprecated; use the top-level stateless helper with a UI message stream.

    7.0.0upgrade guide

  • Replaces StreamTextResult.fullStream as the full event stream returned by streamText; fullStream remains a deprecated alias.

    7.0.0upgrade guide

  • totalUsage is deprecated; use usage, which now contains token usage across all steps.

    7.0.0upgrade guide

  • The streamText result method is deprecated; use the top-level stateless toTextStream and createTextStreamResponse helpers.

    7.0.0upgrade guide

  • The streamText result method is deprecated; use the stateless top-level helper, which can transform any stream rather than only a streamText result.

    7.0.0upgrade guide

  • The streamText result method is deprecated; use the top-level stateless stream helpers and createUIMessageStreamResponse.

    7.0.0upgrade guide

New APIs and options 3

  • Declare a tool's context fields with contextSchema so tool callback context is inferred and limited to the declared fields.

    7.0.0upgrade guide

  • Models can return files in reasoning traces as reasoning-file parts, distinct from regular output files; update exhaustive part handling accordingly.

    7.0.0upgrade guide

  • Register a telemetry integration globally at application startup to enable telemetry collection.

    7.0.0upgrade guide

Behavior and default changes 8

  • mediaType accepts a full IANA type or a top-level segment; when only a segment is provided, the subtype is auto-detected from inline bytes where possible.

    7.0.0upgrade guide

  • Replaces experimental_include as the stable option for generateText, streamText, and ToolLoopAgent; the old name remains a deprecated alias.

    7.0.0upgrade guide

  • The onEnd callback follows the result changes: usage and content-related properties cover all steps, while final-step-only properties are available on finalStep.

    7.0.0upgrade guide

  • Replaces experimental_onToolCallFinish as the tool execution end callback for generateText and streamText; the old name remains a deprecated alias.

    7.0.0upgrade guide

  • Replaces experimental_onToolCallStart as the tool execution start callback for generateText and streamText; the old name remains a deprecated alias.

    7.0.0upgrade guide

  • The top-level reasoning option is the provider-agnostic way to control reasoning effort; overlapping providerOptions settings take precedence and can bypass it.

    7.0.0upgrade guide

  • Once a telemetry integration is registered, AI SDK calls emit telemetry events by default; set isEnabled: false to opt out for a call.

    7.0.0upgrade guide

  • Replaces experimental_telemetry as the stable telemetry configuration option; the old name remains a deprecated alias during the migration window.

    7.0.0upgrade guide

@ai-sdk/openai 62 changes

Breaking changes 2

@ai-sdk/openai 4212 changes

Breaking changes 29

  • The Responses provider derives tool definitions from tools registered in the call, drops unregistered entries with a warning, and loads only registered tools named by a namespace entry.

    3.0.144, 4.0.119release notesrelease notes

  • Chat Completions refusal text is emitted as text content in generateText and streamText, including alongside any content; refusals with a stop finish reason are reported as content-filter.

    2.0.141, 3.0.138, 4.0.110release notesrelease notesrelease notes

  • The experimental OpenAI Live method can now resolve asynchronously; await its result before using the connection settings.

    4.0.106release notes

  • The max reasoning effort is now sent only on the Responses API.

    4.0.105release notes

  • Rejects non-streaming transcription because the model has no REST endpoint.

    4.0.104release notes

  • Transcription requests send response_format=verbose_json and segment timestamp granularity only when the caller sets them or the model needs them.

    4.0.104release notes

  • Affected error paths that previously reported other as the finish reason now report error.

    4.0.100release notes

  • Failed and incomplete web searches now become tool errors instead of successful tool results in Responses API calls and batch results.

    2.0.138, 3.0.134, 4.0.91release notesrelease notesrelease notes

  • Arrays passed directly as state are interpreted as decision state parts; JSON arrays must be wrapped in an object or JSON part.

    4.0.89release notes

  • Tool error payloads in OpenAI Chat Completions and Responses are now wrapped in an error object.

    4.0.88release notes

  • Google tool errors and denied executions are now sent under functionResponse.response.error.

    4.0.88release notes

  • Uses the native Decisions API; only gpt-6-luna is supported, so other Responses models no longer work.

    4.0.85release notes

  • The deprecated alias now uses the native Decisions API and no longer works with Responses models other than gpt-6-luna.

    4.0.85release notes

  • A refusal for an individual question now causes the decision call to fail.

    4.0.85release notes

  • Adds a portable max reasoning level, widening the reasoning type and requiring exhaustive consumers to handle max.

    4.0.85release notes

  • Responses API options such as reasoningEffort are no longer applied and produce unsupported-option warnings.

    4.0.85release notes

  • The evaluate API was renamed to decide.

    4.0.84release notes

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

    4.0.79release notes

  • OpenAI Responses function tools now default to strict: false when tool strict mode is omitted.

    4.0.77release notes

  • Responses delegation and Live session updates are rejected before sending.

    4.0.67release notes

  • Unsupported batch request types are now rejected.

    4.0.66release notes

  • propertyNames is removed from JSON Schema generated for OpenAI.

    4.0.66release notes

  • Adds reasoning configuration updates for GPT-6 models.

    4.0.60release notes

  • Unsupported tools are dropped with a warning, and an error is thrown if that leaves allowedTools empty instead of sending an unrestricted request.

    3.0.98, 4.0.43release notesrelease notes

  • Ambiguous or unknown tool names are now warned about or dropped, with declared tools taking precedence over provider tool names.

    3.0.98, 4.0.43release notesrelease notes

  • The baseUrl option has been removed from all providers; use baseURL instead.

    4.0.0upgrade guide

  • File part data is tagged with a type, and the image part type is removed.

    4.0.0release notes

  • The OpenAI facade has been removed; use the openai object or createOpenAI function instead.

    1.0.0, 4.0.0upgrade guiderelease notes

  • customTool() no longer accepts a name field; the tool name is derived from its key in the tools object.

    4.0.0release notes

Security 6

  • Azure image downloads are kept separate from provider authentication wrappers so file hosts do not receive Azure bearer tokens.

    4.0.116release notes

  • Adds a fetch option so downloads can use a configured transport, including guarded-fetch for opt-in DNS validation on Node.js.

    4.0.116release notes

  • Vertex tool-result downloads are kept separate from provider authentication wrappers so file hosts do not receive Vertex Express Mode API keys.

    4.0.116release notes

  • Add Secure MCP tunnel support through tunnelId; tunnel targets cannot be combined with serverUrl or connectorId.

    4.0.109release notes

  • Denied programmatic tool calls are now rejected.

    4.0.63release notes

  • Blank and dot-segment file IDs are rejected or encoded to prevent request-path retargeting.

    4.0.55release notes

Deprecations 3

  • The webSearchPreview() tool is deprecated.

    4.0.96release notes

  • A warning is emitted when reasoningSummary is used with chat models.

    4.0.84release notes

  • Direct OpenAI batch providers return an unsupported warning when webhookUrl is provided.

    4.0.47release notes

New APIs and options 87

  • Adds support for the GPT-6.2 Astra model.

    4.0.120release notes

  • Adds support for the GPT-6.2 Sol model.

    4.0.120release notes

  • Adds experimental extraction models backed by structured language model output.

    4.0.117release notes

  • Adds positioned additionalTools and accepts custom and namespace tools.

    3.0.142, 4.0.116release notesrelease notes

  • Exposes prompt cache comparison diagnostics for generation, streaming, and batch results.

    4.0.115release notes

  • Expose customTool through azure.tools for Azure Responses models, sharing the OpenAI custom tool factory and its raw string input support.

    4.0.109release notes

  • Expose shell for local and hosted shell execution through the Azure Responses API.

    4.0.109release notes

  • Add the memoryLimit property to the codeInterpreter tool.

    4.0.109release notes

  • Add the networkPolicy property to the codeInterpreter tool.

    4.0.109release notes

  • Support complexity for GPT Image 2.6 models.

    3.0.137, 4.0.109release notesrelease notes

  • Support markup-guided edits for GPT Image 2.6 models.

    3.0.137, 4.0.109release notesrelease notes

  • Return the upstream realtime WebSocket URL and header authentication derived from configured credentials for conversation and transcription intents.

    4.0.109release notes

  • Support animated GIF output for GPT Image 2.6 models, with frameCount and frameDurationMs.

    4.0.109release notes

  • Support safetyIdentifier for image models.

    3.0.137, 4.0.109release notesrelease notes

  • Expose optional transcription word timings separately from segments.

    4.0.109release notes

  • Provider API key settings now accept promises and synchronous or asynchronous callbacks, resolving credentials per authenticated request while preserving existing authentication behavior and synchronous credential serialization.

    4.0.106release notes

  • Provider token settings now accept promises and synchronous or asynchronous callbacks, resolving credentials per authenticated request while preserving existing authentication behavior and synchronous credential serialization.

    4.0.106release notes

  • Adds support for the GPT-6.1 Terra model.

    3.0.133, 4.0.104release notesrelease notes

  • Responses function tools now support Azure provider options.

    3.0.132, 4.0.103release notesrelease notes

  • Adds azure.tools.toolSearch.

    3.0.132, 4.0.103release notesrelease notes

  • Adds support for 12h prompt cache writes and cache prewarming.

    4.0.99release notes

  • Decision calls accept maxOutputTokens and reasoning and forward them to language-model-backed decisions; omitted reasoning stays disabled for language-model adapters, and native providers warn when either setting is unsupported.

    4.0.98release notes

  • Adds decisions API support for Perplexity.

    4.0.97release notes

  • Azure OpenAI language-model factories accept an optional modelId for accurate telemetry and capability detection with custom deployment names, while keeping the deployment ID for API routing.

    4.0.97release notes

  • Tool results can provide ordered additional_tools.

    3.0.142, 4.0.96release notesrelease notes

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

    4.0.89release notes

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

    4.0.89release notes

  • The Decisions API supports the OpenAI safetyIdentifier provider option.

    4.0.85release notes

  • Adds telemetry to speech generation and transcription, with provider usage propagation and experimental streaming lifecycle callbacks.

    4.0.83release notes

  • Adds GPT-6.1 Sol model support for developers using the OpenAI provider.

    2.0.132, 3.0.121, 4.0.82release notesrelease notesrelease notes

  • Adds capability declarations for Together AI FLUX.2 Pro and Flex single-image editing with masks.

    4.0.79release notes

  • Supports the 'none' reasoning effort for GPT-6 Sol and Luna in request-level options and positioned system messages.

    4.0.78release notes

  • Applications can change reasoning effort during a conversation while preserving the prompt prefix for caching.

    2.0.130, 3.0.118, 4.0.75release notesrelease notesrelease notes

  • GPT-6 Sol and Luna model IDs are now available for use.

    2.0.128, 3.0.116, 4.0.73release notesrelease notesrelease notes

  • Adds experimental Choice, Score, and Boolean evaluations with preserved labels and metadata, score-bound validation, and Boolean P(true) estimates constrained to [0, 1].

    4.0.69release notes

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

    4.0.67release notes

  • Applications exchange SDP through an application endpoint for browser-direct Live sessions.

    4.0.67release notes

  • Live sessions expose cumulative voice usage information.

    4.0.67release notes

  • Live sessions support microphone mute controls.

    4.0.67release notes

  • Adds experimental OpenAI Live provider support through a unified factory for server WebSocket sessions with client delegation.

    4.0.67release notes

  • Realtime v4 supports per-connection raw-event parsers.

    4.0.67release notes

  • Realtime v4 adds optional server WebSocket configuration for server adapters.

    4.0.67release notes

  • Experimental browser-direct WebRTC is available for client-delegated Live conversations alongside WebSocket sessions.

    4.0.67release notes

  • Image generation requests are now supported in batches.

    4.0.66release notes

  • Providers can now disable web search source includes.

    4.0.66release notes

  • Adds support for cancelling batches.

    4.0.65release notes

  • Adds support for listing batches.

    4.0.65release notes

  • Adds GPT Image 2.5 Flare and Sunburst model IDs for use with the OpenAI provider.

    3.0.111, 4.0.63release notesrelease notes

  • Adds max quality support for GPT Image 2.5 Flare and Sunburst across image generation, image editing, and the Responses API image generation tool.

    4.0.62release notes

  • Adds xhigh quality support for GPT Image 2.5 Flare and Sunburst across image generation, image editing, and the Responses API image generation tool.

    4.0.62release notes

  • Async tool calling is now supported.

    3.0.110, 4.0.61release notesrelease notes

  • Batch requests can now specify models per request.

    4.0.61release notes

  • Adds support for transcription with chunking and diarized speaker metadata.

    4.0.59release notes

  • Adds support for the gpt-6-astra model.

    2.0.124, 3.0.108, 4.0.59release notesrelease notesrelease notes

  • Adds support for the ultrafast service tier, allowing developers to use that service tier with the OpenAI provider.

    3.0.123, 4.0.58release notesrelease notes

  • OpenAI and xAI batch input file uploads now accept an input file expiration provider option.

    4.0.57release notes

  • Batch start results now expose the uploaded input file ID and its expiration metadata.

    4.0.57release notes

  • Adds deleteFile to the OpenAI files interface.

    4.0.55release notes

  • Adds streaming downloadFile support to the OpenAI files interface.

    4.0.55release notes

  • All file operations now accept and propagate abortSignal.

    4.0.55release notes

  • All file operations now accept and propagate headers.

    4.0.55release notes

  • File uploads support streaming data through the { type: 'stream' } form.

    4.0.55release notes

  • Adds getFileMetadata to the OpenAI files interface.

    4.0.55release notes

  • Upload results now expose byteSize.

    4.0.55release notes

  • Upload results now expose createdAt.

    4.0.55release notes

  • Upload results now expose expiresAt.

    4.0.55release notes

  • Batch operations now support tool calling.

    4.0.54release notes

  • Adds support for explicitly triggering compaction in Responses.

    4.0.42release notes

  • An allowedTools provider option is available for OpenAI Responses.

    4.0.0release notes

  • The gpt-5.3-chat-latest model is added.

    4.0.0release notes

  • GPT-5.4 model support is added.

    4.0.0release notes

  • The gpt-5.4-mini model and dated variant are added.

    4.0.0release notes

  • The gpt-5.4-nano model and dated variant are added.

    4.0.0release notes

  • GPT-5.5 chat model IDs are added.

    4.0.0release notes

  • Support for the gpt-image-2 model is added.

    4.0.0release notes

  • Realtime session configuration can request transcribed user audio messages when the provider supports it.

    4.0.0release notes

  • Experimental realtime support enables speech-to-speech conversations, including an OpenAI realtime provider and a static getToken() method for server-side ephemeral token creation.

    4.0.0release notes

  • Tool definitions support namespaces.

    4.0.0release notes

  • Orchestration token usage details are added to Responses API usage.

    4.0.0release notes

  • Provider references are supported, including uploading files as supported per provider.

    4.0.0release notes

  • A top-level reasoning parameter is added to the spec and supported in generateText and streamText.

    4.0.0release notes

  • Server side compaction for OpenAI is added.

    4.0.0release notes

  • A new tool search tool is added.

    4.0.0release notes

  • An opt-in pass-through is added for unsupported file media types.

    4.0.0release notes

  • A provider instance can be passed to uploadFile as shorthand.

    4.0.0release notes

  • Provider skills can be uploaded using the provider references abstraction.

    4.0.0release notes

  • A provider instance can be passed to uploadSkill as shorthand.

    4.0.0release notes

Performance 1

Behavior and default changes 19

  • Known model ID suggestions are derived from provider model catalog declarations, so catalog updates automatically update autocomplete while preserving existing suggestions, endpoint-specific lists, and support for custom model IDs.

    4.0.118release notes

  • The function returned by createDownload can be passed to generateText and streamText, and the hook now handles generated file URLs as well as other core downloads.

    4.0.116release notes

  • Changing structured output schemas can preserve earlier reasoning and prompt cache reuse.

    2.0.143, 3.0.141, 4.0.115release notesrelease notesrelease notes

  • Adds a stable request-level text format override.

    2.0.143, 3.0.141, 4.0.115release notesrelease notesrelease notes

  • Report the actual OpenAI Chat HTTP endpoint through optional request metadata, model-call end events, OpenTelemetry chat spans, generation results, and callbacks; expose only sanitized origins where applicable.

    4.0.109release notes

  • Accept shared timestampGranularities; explicit provider timing settings take precedence, and OpenAI sends timestamp_granularities only with verbose_json.

    4.0.109release notes

  • Native JSON input and prompt cache keys are sent to Decisions.

    4.0.105release notes

  • OpenAI streams that end cleanly without a provider completion signal now report interrupted and preserve partial output without emitting an error solely for the interruption.

    4.0.100release notes

  • Streamed custom-tool input is marked as text for progressive display, encoding is preserved across saved and resumed UI messages, while final tool-call inputs remain JSON-encoded.

    4.0.95release notes

  • Complete web-search URLs and file-search documents are exposed as sources, including citation-derived sources when retrieval data is unavailable.

    4.0.92release notes

  • Top-level embedding dimensions are mapped to provider settings.

    4.0.91release notes

  • Image detail is sent in decisions.

    4.0.91release notes

  • Decision refusals are now reported as refusal answers.

    4.0.86release notes

  • Asynchronous capability lookups and middleware overrides can now resolve to unknown.

    4.0.79release notes

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

    4.0.67release notes

  • Azure AI Foundry Responses requests now include explicit message item types.

    2.0.126, 3.0.111, 4.0.63release notesrelease notesrelease notes

  • imageDetail providerOptions are forwarded on tool-result image content.

    4.0.0release notes

  • Reasoning summaries now default to detailed when reasoning effort is enabled.

    4.0.0release notes

  • Queries from web_search_call.action.queries are forwarded from the Responses API.

    4.0.0release notes

Fixes and other changes 67

  • Input transformations are returned in responses provider metadata.

    4.0.121release notes

  • Keeps tool-result additionalTools working for parallel results and OpenAI options.

    4.0.116release notes

  • Custom download requests receive the call's abort signal, preserving cancellation and timeouts for prompt assets and generated files.

    4.0.116release notes

  • Refusal logprobs are included after content logprobs in emission order for generateText and streamText.

    4.0.110release notes

  • streamText now collects logprobs across all chunks, reporting every streamed token rather than only the last chunk's tokens.

    4.0.110release notes

  • Responses API refusal content parts and stream events are parsed; refusal explanations become text and the finish reason is content-filter, except when a client-side function call keeps it tool-calls.

    2.0.141, 3.0.138, 4.0.110release notesrelease notesrelease notes

  • Forward the moderation option to /images/edits.

    4.0.109release notes

  • Forward per-message names on Chat Completions system, developer, user, and assistant messages; validate names as strings and warn for unsupported tool messages.

    4.0.109release notes

  • Serialize dedicated transcription sessions with session.type set to transcription and the selected realtime model id; reject unsupported output settings and translation.

    4.0.109release notes

  • Populate normalized usage on response-done and input-transcription-completed events, including gross token counts, cached portions, and duration-billed transcription.

    4.0.109release notes

  • Transcription hints are forwarded as repeated multipart fields instead of being silently dropped; REST-only options supplied to streaming transcription trigger a warning.

    3.0.136, 4.0.107release notesrelease notes

  • Preserves valid JSON string tool arguments and serializes BigInt and cycles in tool calls and results, while retaining malformed argument replay fallbacks.

    2.0.140, 3.0.136, 4.0.107release notesrelease notesrelease notes

  • OpenAI no longer drops provider-specific reasoning effort values that are not in its list for the model.

    4.0.105release notes

  • Top-level reasoning maps to efforts supported by GPT-5.x models instead of sending unsupported values; GPT-5.6 Chat Completions uses reasoning_effort: 'none' with function tools and warns when a reasoning level was requested.

    4.0.105release notes

  • Falls back to usage.seconds for duration-billed json responses when the response has no top-level duration.

    4.0.104release notes

  • Schemas with propertyNames that omit type: 'string' are stripped instead of triggering an unsupported functionality error.

    4.0.104release notes

  • Supports streaming transcription with gpt-live-transcribe and gpt-transcribe; for these models, the language provider option is sent as a single-entry languages list.

    4.0.104release notes

  • gpt-transcribe warns about and omits streaming.delay because the model does not support it.

    4.0.104release notes

  • Unfinished web searches are reported as tool errors.

    4.0.104release notes

  • Fixes string interpolation in OpenAI and OpenAI-compatible completion errors for unexpected system messages.

    4.0.103release notes

  • Fixes string interpolation in Amazon Bedrock unsupported provider tool warnings.

    4.0.103release notes

  • Fixes non-streaming structured output when multiple assistant messages contain JSON, selecting the last final_answer while preserving generated content, annotations, conversation history, and token usage.

    4.0.102release notes

  • Provider-returned identifiers are encoded in credentialed follow-up request paths.

    4.0.99release notes

  • The shell_call max_output_length value is forwarded to the shell tool and round-tripped.

    4.0.98release notes

  • The shell_call timeout_ms value is forwarded to the shell tool.

    4.0.98release notes

  • Transcription responses preserve detected language codes.

    4.0.98release notes

  • Assistant text parts are sent as item references only when preceded by reasoning, preventing follow-up request failures after reasoning is pruned.

    4.0.93release notes

  • Custom tool input deltas are JSON-encoded for progressive UI updates.

    3.0.126, 4.0.92release notesrelease notes

  • Web search results are replayed when response storage is disabled.

    3.0.125, 4.0.92release notesrelease notes

  • Sampling parameters are preserved for GPT-6 Sol and Luna when reasoning is disabled, including reasoning effort updates in Responses requests.

    4.0.90release notes

  • Avoids duplicate references for stored messages containing multiple text parts.

    4.0.87release notes

  • JSONL rows are limited to 64 MB during batch result downloads.

    4.0.85release notes

  • Recursive Zod schemas using allOf wrappers are rewritten correctly.

    3.0.124, 4.0.81release notesrelease notes

  • Uses a standards-compliant User-Agent header.

    4.0.80release notes

  • Capability declarations now use confirmed model IDs, keeping unrecognized model names unknown.

    4.0.79release notes

  • Advertises file-input support for QuiverAI Arrow 2 and Arrow 2 Telos image models.

    4.0.79release notes

  • Fixes streamed tool calls when IDs are missing, blank, or repeated.

    4.0.79release notes

  • Unsupported efforts are validated per model, with request-level updates warned and omitted and historical updates rejected.

    4.0.78release notes

  • Responses stream errors with null codes are classified correctly.

    3.0.125, 4.0.74release notesrelease notes

  • Chat Completions audio transcripts are now exposed as generated text.

    2.0.129, 3.0.117, 4.0.73release notesrelease notesrelease notes

  • Unsupported regex patterns are stripped from JSON schemas.

    4.0.72release notes

  • Speech provider options are now included in requests.

    4.0.72release notes

  • Image edit URL downloads are canceled when the request is aborted, preventing unnecessary continued downloads.

    4.0.71release notes

  • Responses tool results now preserve provider file references.

    3.0.114, 4.0.70release notesrelease notes

  • Assistant text is now sent as Responses easy input messages.

    4.0.70release notes

  • Realtime client event IDs are preserved for session updates and audio appends, enabling correlated server errors.

    4.0.67release notes

  • Returns an AI SDK error when chat completion choices are empty.

    2.0.127, 3.0.112, 4.0.64release notesrelease notesrelease notes

  • Apply patch responses now report a tool-calls finish reason.

    3.0.113, 4.0.63release notesrelease notes

  • Adds support for documented Responses image generation options.

    4.0.58release notes

  • Responses API raw usage objects now preserve their complete contents.

    3.0.107, 4.0.57release notesrelease notes

  • Responses now handle null usage values correctly.

    4.0.54release notes

  • Fixes workflow deserialization for OpenAI Responses models.

    4.0.53release notes

  • Explicit prompt cache breakpoints are preserved on scalar Responses tool results.

    3.0.106, 4.0.52release notesrelease notes

  • Fixes Responses history serialization for regular functions named tool_search.

    3.0.104, 4.0.50release notesrelease notes

  • Non-object replayed Chat Completions tool arguments are normalized to empty objects.

    2.0.122, 3.0.104, 4.0.49release notesrelease notesrelease notes

  • Internal parallel tool call wrappers from the Responses API are expanded while preserving stateful continuation and streaming fallbacks.

    3.0.99, 4.0.45release notesrelease notes

  • Tool call IDs that are empty strings are now handled correctly.

    4.0.44release notes

  • Responses allowedTools now supports built-in and provider-defined tools by deriving entries from each declared tool.

    3.0.98, 4.0.43release notesrelease notes

  • Client-executed tool calls are sent as full function_call items in the Responses API so they pair with their function_call_output by call_id.

    4.0.0release notes

  • Tool result output content file part types are aligned with top-level message file part types.

    4.0.0release notes

  • File-URL parts are supported in tool output content.

    4.0.0release notes

  • The namespace is preserved on function_call output items.

    4.0.0release notes

  • The namespace is read from providerOptions.openai.namespace or providerMetadata.openai.namespace and included when serializing function_call input items.

    4.0.0release notes

  • Reasoning items are skipped when using a previous response id.

    4.0.0release notes

  • Streaming tool calls are finalized only after the stream is fully consumed, preventing execution with incomplete arguments when partial JSON is parsable.

    4.0.0release notes

  • Tool-only assistant messages send content: null instead of an empty string.

    4.0.0release notes

  • Provider models can cross workflow step boundaries without serialization errors; provider config headers are optional.

    4.0.0release notes

@ai-sdk/openai 363 changes

Breaking changes 4

  • OpenAI-compatible Chat Completions providers now return refusal text after content and report non-empty refusals with a stop finish reason as content-filter; non-string refusals are ignored.

    3.0.138release notes

  • Use embeddingModel instead of textEmbeddingModel to select an embedding model.

    3.0.0release notes

  • Reasoning model detection changes from a blocklist to an allowlist and adds an override option.

    3.0.0release notes

  • Support code for the unsupported o1-mini and o1-preview models is removed.

    3.0.0release notes

Deprecations 1

  • textEmbeddingModel is deprecated in favor of embeddingModel.

    3.0.0release notes

New APIs and options 36

  • Responses now supports contextManagement and compaction items.

    3.0.143release notes

  • Prompt cache comparison diagnostics are exposed for generation and streaming results.

    2.0.143, 3.0.141release notesrelease notes

  • Image models now support the frameCount option for animated GIF output.

    3.0.137release notes

  • Image models now support the frameDurationMs option for animated GIF output.

    3.0.137release notes

  • GPT Image 2.6 models are now supported by the OpenAI provider.

    3.0.137release notes

  • Image models can now produce animated GIF output with outputFormat set to 'gif'.

    3.0.137release notes

  • Adds support for 12h prompt cache writes.

    3.0.131release notes

  • Adds support for cache prewarming.

    3.0.131release notes

  • Image generation, editing, and the Responses API image generation tool now support xhigh and max quality for GPT Image 2.5 Flare and Sunburst.

    3.0.110release notes

  • Added GPT-6 reasoning configuration updates for OpenAI integrations.

    2.0.125, 3.0.109release notesrelease notes

  • A provider-defined apply_patch tool is available, with streaming support for partial diffs.

    3.0.0release notes

  • Azure supports image_generation, code_interpreter, and file_search capabilities through the Responses API.

    3.0.0release notes

  • The provider supports the OpenAI conversations API.

    3.0.0release notes

  • Additional settings are available for the file search tool.

    3.0.0release notes

  • The gpt-5-codex model ID is supported.

    3.0.0release notes

  • The gpt-5.1 model ID is supported.

    3.0.0release notes

  • GPT-5.1 Codex Max is added to the OpenAI Responses model IDs list.

    3.0.0release notes

  • GPT-5.2 models are supported.

    3.0.0release notes

  • The gpt-image-1-mini, gpt-5-pro, and gpt-5-pro-2025-10-06 model IDs are supported.

    3.0.0release notes

  • The gpt-image-1.5 model is supported.

    3.0.0release notes

  • Image editing is supported.

    3.0.0release notes

  • Image generation results can be previewed.

    3.0.0release notes

  • A local shell tool is available.

    3.0.0release notes

  • An OpenAI provider MCP tool is available.

    3.0.0release notes

  • The o3-deep-research and o4-mini-deep-research models are supported.

    3.0.0release notes

  • The provider supports the OPENAI_BASE_URL environment variable for configuring its base URL.

    3.0.0release notes

  • The OpenAIChatLanguageModelOptions type is exported for typing OpenAI chat provider options.

    3.0.0release notes

  • The gpt5.1 series supports promptCacheRetention set to 24h.

    3.0.0release notes

  • Provider-defined tools can be given custom names.

    3.0.0release notes

  • The raw finish reason is exposed.

    3.0.0release notes

  • OpenAI supports the xhigh reasoning effort setting.

    3.0.0release notes

  • default is now supported as a service tier.

    3.0.0release notes

  • Tool execution approval is supported.

    3.0.0release notes

  • Tool output content supports flexible content forms.

    3.0.0release notes

  • The Responses API supports the truncation parameter.

    3.0.0release notes

  • The web_search tool supports the external_web_access parameter.

    3.0.0release notes

Behavior and default changes 9

  • Complete parallel-tool wrapper input is no longer repeated in every expanded tool call's metadata; wrapper reconstruction for follow-up Responses API requests is preserved.

    3.0.140release notes

  • Streamed input is marked with inputEncoding: 'text' for progressive UI display without JSON parsing, and the encoding persists when partial UI messages are saved and resumed.

    3.0.129release notes

  • Azure OpenAI supports web-search-preview.

    3.0.0release notes

  • Built-in Code Interpreter tool input code is streamed in tool-input start, delta, and end chunks.

    3.0.0release notes

  • OpenAI provider tools support file and image results.

    3.0.0release notes

  • Image generation responses include more metadata.

    3.0.0release notes

  • When store is true, assistant text and tool call parts are sent as reference IDs.

    3.0.0release notes

  • When store is false, reasoning.encrypted_content is automatically included.

    3.0.0release notes

  • Web-search actions include sources.

    3.0.0release notes

Fixes and other changes 13

  • Logprobs now include refusal logprobs and collect tokens across all streamed chunks, rather than reporting only the last chunk's logprobs.

    2.0.141, 3.0.138release notesrelease notes

  • Forwards the keywords transcription hint as a repeated multipart field instead of silently dropping it.

    2.0.140, 3.0.136release notesrelease notes

  • Reads durationInSeconds from usage.seconds when a duration-billed response has no top-level duration.

    2.0.137, 3.0.133release notesrelease notes

  • Requests with OpenAI provider options use response_format: 'json' for gpt-transcribe and dated gpt-4o-mini-transcribe snapshots, which reject verbose_json.

    3.0.133release notes

  • Assistant text is sent with content when reasoning was removed, preventing follow-up request failures after reasoning is pruned.

    3.0.127release notes

  • Preserves streamed tool calls when IDs and indices are unreliable.

    2.0.131, 3.0.120release notesrelease notes

  • Early stream errors now preserve retryability.

    3.0.117release notes

  • Incomplete function-call and custom-tool-call items now finish with length instead of causing a TypeValidationError.

    2.0.128, 3.0.116release notesrelease notes

  • Mid-stream Responses error events are flattened for more consistent error handling.

    3.0.107release notes

  • Schema-invalid known Responses stream events are signaled, and the error finish reason is preserved.

    3.0.102release notes

  • Prevents negative text output token counts by treating Perplexity reasoning tokens separately from completion tokens.

    3.0.101release notes

  • Responses API providerMetadata distinguishes between OpenAI and Azure.

    3.0.0release notes

  • GPT-5.1 and GPT-5.2 support temperature and related non-reasoning parameters when reasoningEffort is none.

    3.0.0release notes

@ai-sdk/openai 223 changes

Breaking changes 5

  • Requests with OpenAI provider options use response_format: 'json' for gpt-transcribe and dated gpt-4o-mini-transcribe snapshots, which reject verbose_json.

    2.0.137release notes

  • File search gains filters and updated field names.

    2.0.0release notes

  • Legacy function calling is removed.

    2.0.0release notes

  • OpenAI provider settings move to providerOptions.

    2.0.0release notes

  • The OpenAI provider switches its default to the Responses API.

    2.0.0release notes

New APIs and options 11

  • OpenAI Responses models now support asynchronous function tool calling.

    2.0.126release notes

  • The Responses API gains support for encrypted_reasoning.

    2.0.0release notes

  • Speech generation is available through experimental_generateSpeech.

    2.0.0release notes

  • Transcription is available through experimental_transcribe.

    2.0.0release notes

  • The include parameter can request file_search_call.results.

    2.0.0release notes

  • The provider adds GPT-4.1 models.

    2.0.0release notes

  • The provider adds support for gpt-4o-search-preview and handles unsupported parameters.

    2.0.0release notes

  • The provider adds support for gpt-image-1 image generation.

    2.0.0release notes

  • The provider adds o3 and o4-mini models.

    2.0.0release notes

  • The provider adds support for reasoning summaries in the Responses API.

    2.0.0release notes

  • The provider adds service tier support for priority and flex processing.

    2.0.0release notes

Behavior and default changes 3

  • OpenAI image generation returns revised prompts in providerMetadata.

    2.0.0release notes

  • Strict mode defaults to false for the OpenAI provider.

    2.0.0release notes

  • Structured outputs are enabled by default and switched to a provider option.

    2.0.0release notes

Fixes and other changes 4

  • Transcription hints are forwarded as repeated multipart fields instead of being silently dropped.

    2.0.140release notes

  • Follow-up requests no longer fail when reasoning is pruned; assistant text and function calls are sent with content unless preceded by reasoning.

    2.0.135release notes

  • Web search results, including tools with custom names, are replayed when response storage is disabled.

    2.0.134release notes

  • Log probabilities are exposed as providerMetadata.

    2.0.0release notes

@ai-sdk/openai 11 changes

Breaking changes 1