Packages

@ai-sdk/openai

4.0.108 · 3 Nov 2026Apache-2.022M / weekRepositoryHomepagenpmAtom feed

Your version

3.0.0

major22 Dec 2025Where it was published

3.0.136 is the newest release of 3.x.

In short

1 breaking45 new30 fixed12 internal

  • breaking

    Ai SDK 6 beta

Release note

Major Changes

  • breaking

    Ai SDK 6 beta

Patch Changes

  • provider: Add specificationVersion to ProviderV3

  • Fix the "incomplete_details" key from nullable to nullish for openai compatibility

  • provider: Shared spec v3

  • openai: Additional settings for file search tool

  • openai: Add the new provider 'apply_patch' tool

  • fix(openai); fix url_citation schema in chat api

  • openai: Extract meta data from first chunk that contains any

  • provider: Speech model v3 spec

  • provider/openai: Send assistant text and tool call parts as reference ids when store: true

  • Remove code for unsuported o1-mini and o1-preview models

  • Support OPENAI_BASE_URL env

  • Enables image_generation capabilities in the Azure provider through the Responses API.

  • feat(openai); update spec for mcp approval

  • provider/openai: OpenAIChatLanguageModelOptions type

    import { openai, type OpenAIChatLanguageModelOptions } from '@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,
      },
    });
  • provider/openai: Support conversations api

  • openai: Add support for 'promptCacheRetention: 24h' for gpt5.1 series

  • openai: Adding provider mcp tool for openai

  • provider/openai: Automatically add reasoning.encrypted_content include when store = false

  • openai: Allow custom names for provider-defined tools

  • Enables code_interpreter and file_search capabilities in the Azure provider through the Responses API

  • EmbeddingModelV3

  • provider/openai: Add GPT 5.1 Codex Max to OpenAI Responses model IDs list

  • Feat (provider/openai): include more image generation response metadata

  • Tool execution approval

  • Provider-V3

  • Extended token usage

  • Add provider version to user-agent header

  • openai: Add sources in web-search actions

  • Set the annotations from the Responses API to doStream

  • provider/openai: Fix web search tool input types

  • provider/openai: Add gpt-5-codex model id

  • openai: Fix parameter exclusion logic

  • LanguageModelV3

  • Add streaming support for apply_patch partial diffs.

  • Error schema for Responses API

  • refactoring(provider/openai): simplify code

  • provider/openai: Add providerExecuted flag to tool start chunks

  • openai: Preserve file_id when converting file citations

  • openai: Support openai code-interpreter annotations

  • Expose usage tokens for 'generateImage' function

  • openai: Add 'gpt-5.1' modelID

  • provider/openai: Local shell tool

  • openai: Treat unknown models as reasoning

  • Image editing

  • provider/openai: Only send item references for reasoning when store: true

  • The built in Code Interpreter tool input code is streamed in tool-input-<start/delta/end> chunks.

  • provider/openai: Add new model IDs gpt-image-1-mini, gpt-5-pro, gpt-5-pro-2025-10-06

  • Added support for external_web_access parameter on web_search tool

  • openai: Add o3-deep-research and o4-mini-deep-research models

  • provider/openai: Preview image generation results

  • openai: Allow open_page action type url to be nullish

  • openai: revised_prompt sometimes returns null, causing errors

  • provider/openai: Add truncation parameter support for Responses API

  • feat(openai); adding OpenAI's new shell tool

  • Azure OpenAI enabled web-search-preview

  • provider/openai: End reasoning parts earlier

  • Feat (provider/openai): add gpt-image-1.5 model support

  • openai: Refactor apply-patch tool

  • Fix openai responses input: process all provider tool outputs (shell/apply_patch) so parallel tool results aren’t dropped and apply_patch outputs are forwarded.

  • openai: Add gpt-5.2 models

  • provider: Transcription model v3 spec

  • ImageModelV3

  • Add 'default' as service tier

  • Change isReasoningModel detection from blocklist to allowlist and add override option

  • provider/openai: Support file and image tool results

  • Flexible tool output content support

  • Expose raw finish reason

  • Moved dependency @ai-sdk/test-server to devDependencies

  • Add GPT-5.2 support for non-reasoning parameters (temperature, topP, logProbs) when reasoningEffort is none.

  • openai: Allow temperature etc setting when reasoning effort is none for gpt-5.1

  • openai: Change find action type to find_in_page action type

  • openai: Add support for sources type 'api'

  • provider/openai: Add support for OpenAI xhigh reasoning effort

  • tool-specific strict mode

  • Distinguish between OpenAI and Azure in Responses API providerMetadata

  • fix(openai); fix url_citation schema in chat api