Skip to content

fix(deps): update dependency @ai-sdk/openai to v4#127

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/ai-sdk-openai-4.x
Open

fix(deps): update dependency @ai-sdk/openai to v4#127
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/ai-sdk-openai-4.x

Conversation

@renovate

@renovate renovate Bot commented Jun 30, 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 Confidence
@ai-sdk/openai (source) 2.0.894.0.4 age confidence

Release Notes

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

v4.0.4

Compare Source

Patch Changes

v4.0.3

Compare Source

Patch Changes
  • 1ead90c: Return a helpful error when the Responses stream parser receives Chat Completions chunks.

v4.0.2

Compare Source

Patch Changes

v4.0.1

Compare Source

Patch Changes
  • 9507724: feat(openai): add support for web_search_call.results include option

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.79

Compare Source

Patch Changes

v3.0.78

Compare Source

Patch Changes
  • 64a701d: Return a helpful error when the Responses stream parser receives Chat Completions chunks.

v3.0.77

Compare Source

Patch Changes

v3.0.76

Compare Source

Patch Changes

v3.0.75

Compare Source

Patch Changes

v3.0.74

Compare Source

Patch Changes
  • 466544d: feat(openai): add orchestration token usage details to Responses API usage

v3.0.73

Compare Source

Patch Changes
  • 1274c07: 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

v3.0.72

Compare Source

Patch Changes

v3.0.71

Patch Changes

v3.0.69

Compare Source

Patch Changes
  • 9a55f6d: feat(openai): add namespaces for tool definitions

v3.0.68

Compare Source

Patch Changes
  • c65c952: 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.

v3.0.67

Compare Source

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

v3.0.66

Compare Source

Patch Changes
  • c82ab42: feat(openai): forward web_search_call.action.queries from Responses API

v3.0.65

Compare Source

Patch Changes
  • eb52378: fix(openai): skip passing reasoning items when using previous response id

v3.0.64

Compare Source

Patch Changes
  • b7ed8bd: feat(openai): add opt-in pass-through for unsupported file media types

v3.0.63

Compare Source

Patch Changes

v3.0.62

Compare Source

Patch Changes
  • 65edcca: feat: add allowedTools provider option for OpenAI Responses

v3.0.61

Compare Source

Patch Changes
  • b93f9b4: feat(provider/openai): forward imageDetail providerOptions on tool-result image content

v3.0.60

Compare Source

Patch Changes
  • 6dcd8e6: feat(openai): add GPT-5.5 chat model IDs

v3.0.59

Compare Source

Patch Changes
  • 38966ab: fix(openai, openai-compatible): only send null content for assistant messages with tool calls

v3.0.58

Compare Source

Patch Changes
  • 2370948: feat(openai): preserve namespace on function_call output items

v3.0.57

Compare Source

Patch Changes
  • d33e7cc: chore(provider/openai): add type for image model options for type-safe processing

v3.0.55

Compare Source

Patch Changes

v3.0.54

Compare Source

Patch Changes

v3.0.53

Compare Source

Patch Changes
  • 953385d: fix(openai): default undefined tool-call input to empty object before serializing tool arguments

v3.0.52

Compare Source

Patch Changes
  • d42076d: Add AI Gateway hint to provider READMEs

v3.0.51

Compare Source

Patch Changes

v3.0.50

Compare Source

Patch Changes

v3.0.49

Compare Source

Patch Changes
  • bc01093: fix(openai): support file-url parts in tool output content

v3.0.48

Compare Source

Patch Changes
  • 9c548de: 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.

  • bcb04df: 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.

v3.0.47

Compare Source

Patch Changes

v3.0.46

Compare Source

Patch Changes
  • 75fc0e7: feat(openai): add new tool search tool

v3.0.45

Compare Source

Patch Changes
  • 023088c: feat(provider/openai): add gpt-5.3-chat-latest

v3.0.44

Compare Source

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

v3.0.43

Compare Source

Patch Changes

v3.0.42

Compare Source

Patch Changes
  • 2589004: feat(provider/openai): add GPT-5.4 model support

v3.0.41

Compare Source

Patch Changes

v3.0.40

Compare Source

Patch Changes

v3.0.39

Compare Source

Patch Changes

v3.0.38

Compare Source

Patch Changes
  • 64a8fae: chore: remove obsolete model IDs for Anthropic, Google, OpenAI, xAI

v3.0.37

Compare Source

Patch Changes

v3.0.36

Compare Source

Patch Changes
  • 53bdfa5: fix(openai): allow null/undefined type in streaming tool call deltas

    Azure AI Foundry and Mistral deployed on Azure omit the type field in
    streaming tool_calls deltas. The chat stream parser now accepts a missing
    type field (treating it as "function") instead of throwing
    InvalidResponseDataError: Expected 'function' type.

    Fixes #​12770

v3.0.35

Compare Source

Patch Changes
  • 5e18272: fix(openai): include reasoning parts without itemId when encrypted_content is present

    When providerOptions.openai.itemId is absent on a reasoning content part,
    the converter now uses encrypted_content as a fallback instead of silently
    skipping the part with a warning. The OpenAI Responses API accepts reasoning
    items without an id when encrypted_content is supplied, enabling
    multi-turn reasoning even when item IDs are stripped from provider options.

    Also makes the id field optional on the OpenAIResponsesReasoning type to
    reflect that the API does not require it.

    Fixes #​12853

v3.0.34

Compare Source

Patch Changes
  • 66a374c: Support phase parameter on Responses API message items. The phase field ('commentary' or 'final_answer') is returned by models like gpt-5.3-codex on assistant message output items and must be preserved when sending follow-up requests. The phase value is available in providerMetadata.openai.phase on text parts and is automatically included on assistant messages sent back to the API.

v3.0.33

Compare Source

Patch Changes
  • 624e651: Added missing model IDs to OpenAIChatModelId, OpenAIResponsesModelId, OpenAIImageModelId, OpenAISpeechModelId, OpenAITranscriptionModelId, and OpenAICompletionModelId types for better autocomplete support.

v3.0.32

Compare Source

Patch Changes
  • 0c9395b: feat(provider/openai): add gpt-5.3-codex

v3.0.31

Compare Source

Patch Changes
  • d5f7312: fix(openai): change web search tool action to be optional

v3.0.30

Compare Source

Patch Changes
  • ff12133: feat(provider/openai): support native skills and hosted shell

v3.0.29

Compare Source

Patch Changes
  • e2ee705: feat: differentiate text vs image input tokens

v3.0.28

Compare Source

Patch Changes

v3.0.27

Compare Source

Patch Changes
  • 99fbed8: feat: normalize provider specific model options type names and ensure they are exported

v3.0.26

Compare Source

Patch Changes

v3.0.25

Compare Source

Patch Changes

v3.0.24

Compare Source

Patch Changes

v3.0.23

Compare Source

Patch Changes

v3.0.22

Compare Source

Patch Changes
  • 1524271: chore: add skill information to README files

v3.0.21

Compare Source

Patch Changes
  • 2c70b90: chore: update provider docs

v3.0.20

Compare Source

Patch Changes

v3.0.19

Compare Source

Patch Changes
  • 04c89b1: Provide Responses API providerMetadata types at the message / reasoning level.

    • Export the following types for use in client code:
      • OpenaiResponsesProviderMetadata
      • OpenaiResponsesReasoningProviderMetadata
      • AzureResponsesProviderMetadata
      • AzureResponsesReasoningProviderMetadata

v3.0.18

Compare Source

Patch Changes

v3.0.17

Compare Source

Patch Changes
  • 4218f86: fix(openai): preserve tool id for apply patch tool

v3.0.16

Compare Source

Patch Changes
  • 2b8369d: chore: add docs to package dist

v3.0.15

Compare Source

Patch Changes
  • 8dc54db: chore: add src folders to package bundle

v3.0.14

Compare Source

Patch Changes
  • d21d016: feat(openai): add o4-mini model to OpenAIChatModelId type

v3.0.13

Compare Source

Patch Changes
  • 000fa96: fix(openai): filter duplicate items when passing conversationID

v3.0.12

Compare Source

Patch Changes

v3.0.11

Compare Source

Patch Changes

v3.0.10

Compare Source

Patch Changes

v3.0.9

Compare Source

Patch Changes

v3.0.8

Compare Source

Patch Changes
  • 330bd92: Fix Responses code_interpreter annotations and add typed providerMetadata

    • Align Responses API code_interpreter annotation types with the official spec.
    • Add tests to ensure the overlapping parts of the Zod schemas used by doGenerate and doStream stay in sync.
    • Export the following types for use in client code:
      • OpenaiResponsesTextProviderMetadata
      • OpenaiResponsesSourceDocumentProviderMetadata
      • AzureResponsesTextProviderMetadata
      • AzureResponsesSourceDocumentProviderMetadata

v3.0.7

Compare Source

Patch Changes
  • 89202fb: fix(openai/azure): passing response_format correctly

v3.0.6

Compare Source

Patch Changes
  • dc87517: Fix handling of image-url tool result content type in OpenAI Responses API conversion

v3.0.5

Compare Source

Patch Changes

v3.0.4

Compare Source

Patch Changes

v3.0.3

Compare Source

Patch Changes

v3.0.2

Compare Source

Patch Changes
  • e2ee705: feat: differentiate text vs image input tokens

v3.0.1

Compare Source

Patch Changes
  • 04c89b1: Provide Responses API providerMetadata types at the message / reasoning level.

    • Export the following types for use in client code:
      • OpenaiResponsesProviderMetadata
      • OpenaiResponsesReasoningProviderMetadata
      • AzureResponsesProviderMetadata
      • AzureResponsesReasoningProviderMetadata

v3.0.0

Compare Source

Major Changes
Minor Changes
Patch Changes
  • 0c3b58b: fix(provider): add specificationVersion to ProviderV3

  • 4920119: fix the "incomplete_details" key from nullable to nullish for openai compatibility

  • 0adc679: feat(provider): shared spec v3

  • 92c6241: feat(openai): additional settings for file search tool

  • 88fc415: feat(openai): add the new provider 'apply_patch' tool

  • 817e601: fix(openai); fix url_citation schema in chat api

  • dae2185: fix(openai): extract meta data from first chunk that contains any

  • 046aa3b: feat(provider): speech model v3 spec

  • f1277fe: feat(provider/openai): send assistant text and tool call parts as reference ids when store: true

  • 8d9e8ad: chore(provider): remove generics from EmbeddingModelV3

    Before

    model.textEmbeddingModel("my-model-id");

    After

    model.embeddingModel("my-model-id");
  • 60f4775: fix: remove code for unsuported o1-mini and o1-preview models

  • 9a51b92: support OPENAI_BASE_URL env

  • d64ece9: enables image_generation capabilities in the Azure provider through the Responses API.

  • 2625a04: feat(openai); update spec for mcp approval

  • 2e86082: feat(provider/openai): OpenAIChatLanguageModelOptions type

    import { openai, type OpenAIChatLanguageModelOptions } from "@&#8203;ai-sdk/openai";
    import { generateText } from "ai";
    
    await generateText({
      model: openai.chat("gpt-4o"),
      prompt: "Invent a new holiday and describe its traditions.",
      providerOptions: {
        openai: {
          user: "user-123",
        } satisfies OpenAIChatLanguageModelOptions,
      },
    });
  • 0877683: feat(provider/openai): support conversations api

  • d0f1baf: feat(openai): Add support for 'promptCacheRetention: 24h' for gpt5.1 series

  • 831b6cc: feat(openai): adding provider mcp tool for openai

  • 95f65c2: chore: use import * from zod/v4

  • edc5548: feat(provider/openai): automatically add reasoning.encrypted_content include when store = false

  • 954c356: feat(openai): allow custom names for provider-defined tools

  • 544d4e8: chore(specification): rename v3 provider defined tool to provider tool

  • 77f2b20: enables code_interpreter and file_search capabilities in the Azure provider through the Responses API

  • 0c4822d: feat: EmbeddingModelV3

  • 73d9883: chore(openai): enable strict json by default

  • d2039d7: feat(provider/openai): add GPT 5.1 Codex Max to OpenAI Responses model IDs list

  • 88edc28: feat (provider/openai): include more image generation response metadata

  • e8109d3: feat: tool execution approval

  • ed329cb: feat: Provider-V3

  • 3bd2689: feat: extended token usage

  • 1cad0ab: feat: add provider version to user-agent header

  • e85fa2f: feat(openai): add sources in web-search actions

  • 423ba08: Set the annotations from the Responses API to doStream

  • 401f561: fix(provider/openai): fix web search tool input types

  • 4122d2a: feat(provider/openai): add gpt-5-codex model id

  • 0153bfa: fix(openai): fix parameter exclusion logic

  • 8dac895: feat: LanguageModelV3

  • [304222e]

Note

PR body was truncated to here.


Configuration

📅 Schedule: (in timezone Asia/Singapore)

  • Branch creation
    • Between 12:00 AM and 03:59 AM, on day 1 of the month (* 0-3 1 * *)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


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

This PR was generated by Mend Renovate. View the repository job log.

@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
website Error Error Jun 30, 2026 6:42pm

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.

0 participants