Skip to content

build: update dependency @ai-sdk/openai to v4 - #292

Open
angular-robot wants to merge 1 commit into
angular:mainfrom
angular-robot:ng-renovate/ai-sdk-openai-4-x
Open

build: update dependency @ai-sdk/openai to v4#292
angular-robot wants to merge 1 commit into
angular:mainfrom
angular-robot:ng-renovate/ai-sdk-openai-4-x

Conversation

@angular-robot

@angular-robot angular-robot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

ℹ️ Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@ai-sdk/openai (source) 3.0.494.0.60 age adoption passing confidence

  • If you want to rebase/retry this PR, check this box

Release Notes

vercel/ai (@​ai-sdk/openai)

v4.0.60

Compare Source

Patch Changes
  • 17e489e: feat(openai): add GPT-6 reasoning configuration updates

v4.0.59

Compare Source

Patch Changes
  • 4af00d1: feat(openai): add support for the gpt-6-astra
  • abb9ebf: feat(openai): support gpt-4o-transcribe-diarize, including chunking and diarized speaker metadata

v4.0.58

Compare Source

Patch Changes
  • b54e551: fix(openai): support documented Responses image generation options
  • 17d3436: feat(openai): add support for ultrafast service tier

v4.0.57

Compare Source

Patch Changes
  • 048ce06: feat(batch): surface the uploaded input file on the batch start result (providerMetadata.<provider>.inputFileId / inputFileExpiresAt) and accept an inputFileExpiresAfter provider option on the OpenAI and xAI batch input file upload
  • 7243530: fix(openai): preserve complete Responses API raw usage objects

v4.0.56

Compare Source

Patch Changes

v4.0.55

Compare Source

Patch Changes
  • 3fc40db: feat(openai): implement getFileMetadata, downloadFile (streaming), and deleteFile on the OpenAI files interface, support streaming uploads via { type: 'stream' } data, expose byteSize/createdAt/expiresAt on upload results, and thread abortSignal/headers through all file operations; blank and dot-segment file ids are rejected/encoded so they cannot retarget request paths
  • Updated dependencies [5190b67]

v4.0.54

Compare Source

Patch Changes
  • f6fac50: fix(openai): handle null usage in responses
  • e07b577: feat: add tool calling support to batch

v4.0.53

Compare Source

Patch Changes
  • 7439d7a: Fix workflow deserialization for OpenAI Responses models.

v4.0.52

Compare Source

Patch Changes

v4.0.51

Compare Source

Patch Changes

v4.0.50

Compare Source

Patch Changes
  • e6a2992: Fix Responses history serialization for regular functions named tool_search.

v4.0.49

Compare Source

Patch Changes

v4.0.47

Compare Source

Patch Changes
  • 591d25b: feat: add batch completion webhooks. experimental_startTextBatch accepts a webhookUrl, and the gateway provider registers it through the batch callbackUrl contract and exports typed async-job metadata. Direct Anthropic and OpenAI batch providers return an unsupported warning when the option is provided.
  • 2214258: Prevent negative text output token counts when providers report reasoning tokens. Perplexity reasoning tokens are now treated as separate from completion tokens.
  • Updated dependencies [591d25b]

v4.0.46

Compare Source

Patch Changes

v4.0.45

Compare Source

Patch Changes
  • 6be0f51: fix(openai): expand internal parallel tool call wrappers from the Responses API while preserving stateful continuation and streaming fallbacks

v4.0.44

Compare Source

Patch Changes

v4.0.43

Compare Source

Patch Changes
  • a062795: fix(openai): support built-in and provider-defined tools in the Responses allowedTools option

    allowedTools emitted every allow-list entry as { type: 'function', name }, but OpenAI identifies
    built-in tools by type. Allow-listing a declared provider-defined tool (web search, image generation,
    MCP, custom, ...) therefore failed with Tool choice '<name>' not found in 'tools' parameter. Entries
    are now derived from the declared tool, including the MCP server label and custom tool name.

    Tools that OpenAI cannot allow-list (the tool search tool, deferred tools, and namespaced tools) are
    dropped from the allow-list with a warning, and an error is thrown if that would leave the allow-list
    empty rather than silently sending an unrestricted request.

    Ambiguous names are now reported instead of resolved silently. A name that matches both a declared tool
    and another tool's provider tool name resolves to the declared tool and warns; a provider tool name
    shared by several tools in the same request (two MCP servers, for example) is dropped with a warning.
    A name that matches no declared tool keeps its existing behavior and is now warned about.

v4.0.42

Compare Source

Patch Changes
  • b6fff2e: feat(provider/openai): support explicit Responses compaction triggers

v4.0.41

Compare Source

Patch Changes
  • 59d6def: Reconstruct provider-executed shell calls when continuing OpenAI Responses with storage disabled.

v4.0.40

Patch Changes
  • e19a4a6: Avoid duplicate MCP approval request references when continuing stored OpenAI Responses.

v4.0.39

Patch Changes

v4.0.38

Patch Changes
  • d302134: Keep client-executed function calls paired with their outputs when chaining OpenAI Responses with a previous response ID.

v4.0.37

Compare Source

Patch Changes

v4.0.36

Compare Source

Patch Changes
  • 6157098: fix(openai): serialize tool text outputs when an output schema is configured
  • 4cd4548: Accept serviceTier: 'fast' on OpenAI chat and responses models. OpenAI renamed priority processing to Fast mode and accepts service_tier: 'fast' and 'priority' interchangeably, so 'fast' is now passed through verbatim and gated on the same model capability as 'priority'.
  • Updated dependencies [ad6a650]
  • Updated dependencies [81cd026]

v4.0.35

Compare Source

Patch Changes

v4.0.34

Compare Source

Patch Changes
  • 73d48d0: fix(provider/openai): correlate rotating Responses API item IDs by output index
  • bbd9b31: chore: rename *TranslationModel and its related types to *SpeechTranslationModel for consistency

v4.0.33

Compare Source

Patch Changes
  • e6a93c4: feat(openai): support batch APIs with experimental_startTextBatch

v4.0.32

Compare Source

Patch Changes

v4.0.31

Compare Source

Patch Changes

v4.0.30

Compare Source

Patch Changes

v4.0.29

Compare Source

Patch Changes

v4.0.28

Compare Source

Patch Changes

v4.0.27

Compare Source

Patch Changes

v4.0.26

Compare Source

Patch Changes

v4.0.25

Compare Source

Patch Changes
  • beaecb3: fix(provider/openai): resolve responses doStream at response.in_progress instead of first output token

    The early-stream-error peek treated response.in_progress as an unknown chunk, so doStream did not resolve until the first output item arrived — delaying stream availability (and downstream TTFB for proxies/gateways) by the model's full time-to-first-token. response.in_progress is now modeled in the chunk schema and marks the request as accepted: the peek keeps watching for error frames for a short grace window (50ms) so quota/rate-limit errors flushed alongside response.in_progress still throw as retryable APICallErrors, while healthy streams become available right after upstream acknowledges the request.

  • b192878: feat: add experimental_toolCaller routing to generateText for code mode

  • Updated dependencies [d8210b6]

  • Updated dependencies [b192878]

v4.0.24

Compare Source

Patch Changes

v4.0.23

Compare Source

Patch Changes
  • 96a237d: Add blocked domain filters to the OpenAI and Azure Responses API web search tools.

v4.0.22

Compare Source

Patch Changes
  • c49380c: feat: add experimental streaming speech translation models (openai.translation('gpt-realtime-translate') over the OpenAI Realtime translations WebSocket and google.translation('gemini-3.5-live-translate-preview') over the Gemini Live API). connectToWebSocket in @ai-sdk/provider-utils now passes close code and reason to onClose (additive, optional parameter).
  • Updated dependencies [0c464d9]
  • Updated dependencies [c49380c]

v4.0.21

Compare Source

Patch Changes

v4.0.20

Compare Source

Patch Changes
  • 1f6dd3a: Add OpenAI Responses Programmatic Tool Calling with hosted program tools, function caller controls, structured output schemas, and multi-step continuation support.

v4.0.19

Compare Source

Patch Changes
  • 34c53c0: Apply reasoning, service tier, and image defaults to recognizable future OpenAI model family versions.

v4.0.18

Compare Source

Patch Changes
  • bc43dc2: Preserve stored tool search output item IDs from provider metadata.

v4.0.17

Compare Source

Patch Changes

v4.0.16

Compare Source

Patch Changes
  • 75f86f4: fix(provider/openai, provider/open-responses): throw a descriptive error when the Responses API returns a 200 with no output

    A successful (200) Responses body missing the output array previously threw an opaque output is not iterable TypeError from doGenerate. Both providers now surface a clear APICallError ("Responses API returned no output …"), including the incomplete-details reason (and status, for open-responses) when present. When the body includes a response.error, its message is surfaced first so upstream error details aren't masked by the generic fallback. This makes malformed/incomplete upstream responses actionable instead of a cryptic crash.

  • Updated dependencies [cd06458]

v4.0.15

Compare Source

Patch Changes
  • 0063c2d: Add the client-executed OpenAI Responses API computer tool with batched actions and screenshot outputs.

v4.0.14

Compare Source

Patch Changes

v4.0.13

Compare Source

Patch Changes
  • 7805e4a: Fix realtime transcription auth header handling: per-call authorization headers now override configuration headers regardless of header-key casing (last case-variant wins), and the Bearer scheme is matched case-insensitively.
  • cd12954: Reject empty OpenAI, Anthropic, and Replicate base URLs with a helpful AI SDK
    invalid argument error.
  • Updated dependencies [4be62c1]
  • Updated dependencies [7805e4a]
  • Updated dependencies [cd12954]

v4.0.11

Compare Source

Patch Changes
  • b2b1bb9: feat(provider/openai): add GPT-5.6 reasoning and prompt cache controls

v4.0.10

Compare Source

Patch Changes

v4.0.9

Compare Source

Patch Changes
  • ac306ed: Fix StreamingToolCallTracker finalizing streaming tool calls on parsable partial JSON. Tool calls now only finalize during stream flush, restoring the behavior of #​13137: a parsable argument buffer can still be the prefix of a longer argument string, so finalizing early could act on truncated tool inputs.
  • Updated dependencies [ac306ed]

v4.0.8

Compare Source

Patch Changes
  • b51ed36: Send inline image file parts in OpenAI chat requests as data URLs instead of bare base64 strings.

v4.0.7

Compare Source

Patch Changes

v4.0.6

Compare Source

Patch Changes

v4.0.5

Compare Source

Patch Changes
  • 4af00d1: feat(openai): add support for the gpt-6-astra
  • abb9ebf: feat(openai): support gpt-4o-transcribe-diarize, including chunking and diarized speaker metadata

v4.0.4

Compare Source

Patch Changes

v4.0.3

Compare Source

Patch Changes

v4.0.2

Compare Source

Patch Changes

v4.0.1

Compare Source

Patch Changes
  • 34c53c0: Apply reasoning, service tier, and image defaults to recognizable future OpenAI model family versions.

v4.0.0

Compare Source

Major Changes
  • 34bd95d: feat(ai): add support for uploading provider skills using the provider references abstraction

  • ef992f8: Remove CommonJS exports from all packages. All packages are now ESM-only ("type": "module"). Consumers using require() must switch to ESM import syntax.

  • c29a26f: feat(provider): add support for provider references and uploading files as supported per provider

  • 3887c70: feat(provider): add new top-level reasoning parameter to spec and support it in generateText and streamText

  • 61753c3: ### @ai-sdk/openai: remove redundant name argument from openai.tools.customTool()

    openai.tools.customTool() no longer accepts a name field. the tool name is now derived from the sdk tool key (the object key in the tools object).

    migration: remove the name property from customTool() calls. the object key is now used as the tool name sent to the openai api.

    before:

    tools: {
      write_sql: openai.tools.customTool({
        name: 'write_sql',
        description: '...',
      }),
    }

    after:

    tools: {
      write_sql: openai.tools.customTool({
        description: '...',
      }),
    }
@ai-sdk/provider-utils: createToolNameMapping() no longer accepts the resolveProviderToolName parameter

before: tool name can be set dynamically

const toolNameMapping = createToolNameMapping({
  tools,
  providerToolNames: {
    "openai.code_interpreter": "code_interpreter",
    "openai.file_search": "file_search",
    "openai.image_generation": "image_generation",
    "openai.local_shell": "local_shell",
    "openai.shell": "shell",
    "openai.web_search": "web_search",
    "openai.web_search_preview": "web_search_preview",
    "openai.mcp": "mcp",
    "openai.apply_patch": "apply_patch",
  },
  resolveProviderToolName: (tool) =>
    tool.id === "openai.custom"
      ? (tool.args as { name?: string }).name
      : undefined,
});

after: tool name is static based on tools keys

const toolNameMapping = createToolNameMapping({
  tools,
  providerToolNames: {
    'openai.code_interpreter': 'code_interpreter',
    'openai.file_search': 'file_search',
    'openai.image_generation': 'image_generation',
    'openai.local_shell': 'local_shell',
    'openai.shell': 'shell',
    'openai.web_search': 'web_search',
    'openai.web_search_preview': 'web_search_preview',
    'openai.mcp': 'mcp',
    'openai.apply_patch': 'apply_patch',
  }
});
  • 8359612: Start v7 pre-release

  • 04e9009: chore: make provider implementations code patterns more consistent, including renaming certain exported symbols

    For all externally exported symbols that were renamed, the old names continue to work via deprecated aliases.

Patch Changes
  • 29e6ac6: feat: add allowedTools provider option for OpenAI Responses

  • 38fc777: Add AI Gateway hint to provider READMEs

  • a71d345: fix(provider/openai): drop reasoning parts without encrypted content when store: false

  • 7afaece: feat(provider/openai): add GPT-5.4 model support

  • 365da1a: Add gpt-5.4-mini, gpt-5.4-mini-2026-03-17, gpt-5.4-nano, and gpt-5.4-nano-2026-03-17 models.

  • 1772a63: Default OpenAI Responses reasoning summaries to detailed when reasoning effort is enabled.

  • 83f9d04: feat(openai): upgrade v3 specs to v4

  • 45b3d76: fix(security): prevent streaming tool calls from finalizing on parsable partial JSON

    Streaming tool call arguments were finalized using isParsableJson() as a heuristic for completion. If partial accumulated JSON happened to be valid JSON before all chunks arrived, the tool call would be executed with incomplete arguments. Tool call finalization now only occurs in flush() after the stream is fully consumed.

  • bf837fe: feat(provider/gateway): add speech and transcription model support

  • d6c79e3: feat(openai): add GPT-5.5 chat model IDs

  • e776fc7: feat(provider/azure):web search tool in the Azure OpenAI Responses API.

  • 817a1a6: fix(openai): support file-url parts in tool output content

  • 1f509d4: fix(ai): force template check on 'kind' param

  • 0c4ac8a: fix(openai): default undefined tool-call input to empty object before serializing tool arguments

  • 9f0e36c: trigger release for all packages after provenance setup

  • 58a2ad7: fix: more precise default message for tool execution denial

  • 6a5800e: feat(openai): add namespaces for tool definitions

  • ae7f932: fix(openai): throw retryable errors for OpenAI stream failures before output starts

  • 2c4767d: feat(openai): add orchestration token usage details to Responses API usage

  • bada0f3: feat(openai): preserve namespace on function_call output items

  • cd3de8b: feat(openai): forward web_search_call.action.queries from Responses API

  • 94eba1b: fix(openai): round-trip namespace on function_call input items

    When tool_search dispatches a deferred tool, the resulting function_call carries a namespace field identifying which deferred-tool group the model picked. #14789 preserved this on the read side (providerMetadata.openai.namespace), but the write side still serialized function_call input items without namespace. Multi-step / multi-turn conversations then failed with Missing namespace for function_call '<name>'. ... Round-trip the model's function_call item with its namespace field included.

    convert-to-openai-responses-input.ts now reads namespace from providerOptions.openai.namespace (or providerMetadata.openai.namespace) on tool-call parts and includes it on the serialized function_call item, mirroring how itemId is round-tripped.

  • 7bbc194: feat(provider/openai): forward imageDetail providerOptions on tool-result image content

  • 156cdf0: feat(openai): add new tool search tool

  • f7295cb: revert incorrect fix #​13172

  • 9ea40e0: chore(provider/openai): add type for image model options for type-safe processing

  • 7fc6bd6: Raise minimum supported Node.js version to 22. Supported versions: 22, 24, and 26.

  • f807e45: Extract shared StreamingToolCallTracker class into @ai-sdk/provider-utils to deduplicate streaming tool call handling across OpenAI-compatible providers. Also adds missing generateId() fallback for toolCallId in Alibaba's doGenerate path and ensures all providers finalize unfinished tool calls during stream flush.

  • d9a1e9a: feat(openai): add server side compaction for openai

  • 0c4c275: trigger initial canary release

  • ac18f89: feat(provider/openai): add gpt-5.3-chat-latest

  • 6fd51c0: fix(provider): preserve error type prefix in getErrorMessage

  • cd9c311: fix(openai, openai-compatible): only send null content for assistant messages with tool calls

  • e6376c2: fix(openai): preserve raw finish reason for failed responses stream events

    Handle response.failed chunks in Responses API streaming so finishReason.raw is preserved from incomplete_details.reason (e.g. max_output_tokens), and map failed-without-reason cases to unified error instead of other.

  • ce769dd: feat(provider): add experimental Realtime API support for voice conversations

    Adds first-class support for realtime (speech-to-speech) APIs:

    • Experimental_RealtimeModelV4 spec in @ai-sdk/provider with normalized event types and factory
    • OpenAI, Google, and xAI realtime provider implementations
    • openai.experimental_realtime() / google.experimental_realtime() / xai.experimental_realtime() work in both server and browser
    • .getToken() static method on each provider for server-side ephemeral token creation
    • experimental_getRealtimeToolDefinitions helper for provider session tool definitions
    • experimental_useRealtime hook in @ai-sdk/react returning UIMessage[] (aligned with useChat), with onToolCall and addToolOutput for client-driven tool execution
    • inputAudioTranscription session config for showing transcribed user audio messages when supported by the provider
  • e311194: feat(ai): allow passing provider instance to uploadFile and uploadSkill as shorthand

  • 9bd6512: feat(provider): change file part data property to be tagged with a type and remove the image part type

  • 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles

  • 685cec7: feat(openai): add opt-in pass-through for unsupported file media types

  • 61bcdb5: fix(provider/openai): send client-executed tool calls as full function_call items in the Responses API so they pair with their function_call_output by call_id

  • 5463d0d: feat(provider): align tool result output content file part types with top-level message file part types

  • b8396f0: trigger initial beta release

  • bfb756d: patch - send content: null instead of empty string for tool-only assistant messages

  • 90e2d8a: chore: fix unused vars not being flagged by our lint tooling

  • 17b5597: fix(openai): skip passing reasoning items when using previous response id

  • b3976a2: Add workflow serialization support to all provider models.

    @ai-sdk/provider-utils: New serializeModel() helper that extracts only serializable properties from a model instance, filtering out functions and objects containing functions. Third-party provider authors can use this to add workflow support to their own models.

    All providers: headers is now optional in provider config types. This is non-breaking — existing code that passes headers continues to work. Custom provider implementations that construct model configs manually can now omit headers, which is useful when models are deserialized from a workflow step boundary where auth is provided separately.

    All provider model classes now include WORKFLOW_SERIALIZE and WORKFLOW_DESERIALIZE static methods, enabling them to cross workflow step boundaries without serialization errors.

  • ff5eba1: feat: roll image-* tool output types into their equivalent file-* types

  • f9acbc0: feat(provider/openai): add gpt-image-2 model support

v3.0.112

Compare Source

Patch Changes

v3.0.111

Compare Source

Patch Changes
  • 1f75808: Include explicit message item types in Azure AI Foundry Responses requests.
  • 65150c2: feat(openai): add GPT Image 2.5 Flare and Sunburst model IDs

v3.0.110

Compare Source

Patch Changes
  • 447ba18: feat(openai): add async tool calling
  • 46c6820: Add xhigh and max quality support for GPT Image 2.5 Flare and Sunburst in image generation, image editing, and the Responses API image generation tool.

v3.0.109

Compare Source

Patch Changes
  • 7f3b8f0: feat(openai): add GPT-6 reasoning configuration updates

v3.0.108

Compare Source

Patch Changes
  • 019eec8: feat(openai): add support for the gpt-6-astra

v3.0.107

Compare Source

Patch Changes
  • 8844beb: fix(openai): flatten mid-stream Responses error events
  • cf1ba03: fix(openai): preserve complete Responses API raw usage objects

v3.0.106

Compare Source

Patch Changes
  • 85ba0b0: Preserve explicit prompt cache breakpoints on scalar Responses tool results.

v3.0.105

Compare Source

Patch Changes

v3.0.104

Compare Source

Patch Changes
  • 426c9b3: Normalize non-object replayed Chat Completions tool arguments to empty objects.
  • 34d045d: Fix Responses history serialization for regular functions named tool_search.

v3.0.102

Compare Source

Patch Changes
  • 087d7e2: Signal schema-invalid known Responses stream events and preserve the error finish reason.

v3.0.101

Compare Source

Patch Changes
  • 313a441: Prevent negative text output token counts when providers report reasoning tokens. Perplexity reasoning tokens are now treated as separate from completion tokens.
  • Updated dependencies [5642849]

v3.0.100

Compare Source

Patch Changes

v3.0.99

Compare Source

Patch Changes
  • f40afcf: fix(openai): expand internal parallel tool call wrappers from the Responses API while preserving stateful continuation and streaming fallbacks

v3.0.98

Compare Source

Patch Changes
  • 91880b9: fix(openai): support built-in and provider-defined tools in the Responses allowedTools option

    allowedTools emitted every allow-list entry as { type: 'function', name }, but OpenAI identifies
    built-in tools by type. Allow-listing a declared provider-defined tool (web search, image generation,
    MCP, custom, ...) therefore failed with Tool choice '<name>' not found in 'tools' parameter. Entries
    are now derived from the declared tool, including the MCP server label and custom tool name.

    Tools that OpenAI cannot allow-list (the tool search tool, deferred tools, and namespaced tools) are
    dropped from the allow-list with a warning, and an error is thrown if that would leave the allow-list
    empty rather than silently sending an unrestricted request.

    Ambiguous names are now reported instead of resolved silently. A name that matches both a declared tool
    and another tool's provider tool name resolves to the declared tool and warns; a provider tool name
    shared by several tools in the same request (two MCP servers, for example) is dropped with a warning.
    A name that matches no declared tool keeps its existing behavior and is now warned about.

v3.0.97

Compare Source

Patch Changes

v3.0.96

Compare Source

Patch Changes
  • 64facff: Reconstruct provider-executed shell calls when continuing OpenAI Responses with storage disabled.

v3.0.95

Compare Source

Patch Changes
  • bdb46fe: Avoid duplicate MCP approval request references when continuing stored OpenAI Responses.

v3.0.94

Compare Source

Patch Changes
  • d3247d7: Keep client-executed function calls paired with their outputs when chaining OpenAI Responses with a previous response ID.
  • Updated dependencies [b2a4d5a]

v3.0.93

Compare Source

Patch Changes
  • f471a1c: Accept serviceTier: 'fast' on OpenAI chat and responses models. OpenAI renamed priority processing to Fast mode and accepts service_tier: 'fast' and 'priority' interchangeably, so 'fast' is now passed through verbatim and gated on the same model capability as 'priority'.
  • Updated dependencies [2171d15]

[v3.0.92](https://redirect.github.com/vercel/ai/releases/tag/%40ai-sdk/openai%403.

Note

PR body was truncated to here.

See associated pull request for more information.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant