unstale

npm / @ai-sdk/openai

@ai-sdk/openai

What changed in @ai-sdk/openai 2 to 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-17.

18 breaking2 security2 deprecations46 new APIs and options9 behavior and defaults41 fixes and other

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

npx @unstale/cli init

@unstale/cli 0.1.0 on npm

@ai-sdk/openai 4105 changes

Breaking changes 18

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

    4.0.91release 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

Security 2

  • 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 2

  • 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 43

  • 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

Behavior and default changes 8

  • 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

Fixes and other changes 32

  • 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

@ai-sdk/openai 310 changes

New APIs and options 2

  • 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

Behavior and default changes 1

  • 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

Fixes and other changes 7

  • 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

@ai-sdk/openai 23 changes

New APIs and options 1

  • OpenAI Responses models now support asynchronous function tool calling.

    2.0.126release notes

Fixes and other changes 2

  • 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