Packages

@ai-sdk/openai

4.0.111 · 7 Nov 2026Apache-2.022.5M / weekRepositoryHomepagenpmAtom feed

Your version

Where each line stands

Plan an upgrade

Latest releases

All 530 releases
  1. 4.x · latest line
  2. 4.0.111

    7 Nov 2026
    • Add resolveProviderOptions to parse provider options that a model accepts under several providerOptions keys, either as aliases (first) or merged in order (merge), and use it for the existing multi-key lookups in the OpenAI, OpenAI-compatible, Anthropic, Google, and Amazon Bedrock models. Resolution behavior for these models is unchanged.

  3. 4.0.110

    6 Nov 2026
    • Refactor Azure model ID logic into a model catalog that declares capabilities and provider options, and generate provider capability documentation from it. Export the OpenAI catalog internally for Azure to reuse. Request behavior is unchanged.

    • openai: Surface Chat Completions refusals as text content

      The Chat Completions model ignored message.refusal (non-streaming) and delta.refusal (streaming). When the model refused to answer, content was null, so the AI SDK returned empty text with a stop finish reason and silently dropped the refusal. Refusal text is now emitted as text content in both generateText and streamText results, and it is emitted in addition to content when the API returns both. A refusal with a stop finish reason is now reported as a content-filter finish reason, matching the Anthropic provider and the Responses API.

    • openai,openai-compatible: Surface refusal logprobs and openai-compatible refusals

      @ai-sdk/openai: Chat Completions responses that contain a refusal can return logprobs.refusal next to logprobs.content. The provider previously read only logprobs.content, so providerMetadata.openai.logprobs was empty or missing for refusals. Refusal logprobs are now included in emission order (content logprobs followed by refusal logprobs) in both generateText and streamText.

      Streaming logprobs are now collected across all chunks in streamText: previously only the logprobs of the last streamed chunk were reported. This applies to content logprobs as well, so providerMetadata.openai.logprobs now contains the logprobs of every streamed token instead of only the last chunk's tokens. Explicitly empty logprobs (logprobs: { content:, refusal: null }) are reported as an empty array, as before.

      A refusal that arrives in the same streamed chunk as the finish_reason is now taken into account: such a response is reported with a content-filter finish reason instead of stop.

      @ai-sdk/openai-compatible: Chat Completions responses that carry message.refusal (non-streaming) or delta.refusal (streaming) were ignored, so providers such as OpenAI served through createOpenAICompatible lost the refusal text and reported an empty stop response. Refusals are now returned as text content after any content text, and a non-empty refusal with a stop finish reason is reported as a content-filter finish reason. This also applies when the refusal and the finish reason arrive in the same streamed chunk. Non-string refusals (for example refusal: false from servers that use booleans) are ignored instead of failing the response.

  4. 4.0.109

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

    • Add memoryLimit and networkPolicy properties in codeInterpreter tool

    • Add Secure MCP tunnel support to the OpenAI MCP tool via tunnelId. Tunnel targets cannot be combined with serverUrl or connectorId; existing URL and connector configurations remain compatible.

Dependency tracking · free for 3 projects

Know when your own dependencies move

@ai-sdk/openai shipped 2 new majors in the last 12 months, among 322 releases. inlinr shows which of your projects are behind, and what the upgrade breaks.

  • Advisories reach you

    An email when a critical or high advisory affects a project, before the next install.

  • Upgrades checked first

    Peer ranges, Node, ESM-only and types changes read before you bump.

  • Only what matters

    Majors and breaking notes stay; patches and sibling bumps fold into one line.

How dependency tracking works

Registry facts last checked 9 Nov 2026. Releases and advisories last read 9 Nov 2026.