Packages

@ai-sdk/openai

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

Your version

523 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.

  1. 4.0.57

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

    • openai: Preserve complete Responses API raw usage objects

  2. 4.0.56

    2 Sep 2026

    Only updates a dependency:@ai-sdk/provider-utils 5.0.36

  3. 4.0.55

    1 Sep 2026
    • 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

  4. 4.0.54

    1 Sep 2026
    • openai: Handle null usage in responses

    • Add tool calling support to batch

  5. 4.0.53

    31 Aug 2026
    • Fix workflow deserialization for OpenAI Responses models.

  6. 4.0.52

    30 Aug 2026
    • Preserve explicit prompt cache breakpoints on scalar Responses tool results.

  7. 4.0.51

    28 Aug 2026

    Only updates a dependency:@ai-sdk/provider-utils 5.0.33

  8. 4.0.50

    26 Aug 2026
    • Fix Responses history serialization for regular functions named tool_search.

  9. 4.0.49

    26 Aug 2026
    • Normalize non-object replayed Chat Completions tool arguments to empty objects.

  10. 4.0.47

    25 Aug 2026
    • 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.

    • Prevent negative text output token counts when providers report reasoning tokens. Perplexity reasoning tokens are now treated as separate from completion tokens.

  11. 4.0.46

    22 Aug 2026

    Only updates a dependency:@ai-sdk/provider-utils 5.0.29

  12. 4.0.45

    20 Aug 2026
    • openai: Expand internal parallel tool call wrappers from the Responses API while preserving stateful continuation and streaming fallbacks

  13. 4.0.44

    19 Aug 2026
    • Handle empty string tool call IDs

  14. 4.0.43

    18 Aug 2026
    • 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.

  15. 4.0.42

    14 Aug 2026
    • provider/openai: Support explicit Responses compaction triggers

  16. 4.0.41

    12 Aug 2026
    • Reconstruct provider-executed shell calls when continuing OpenAI Responses with storage disabled.

  17. 4.0.40

    11 Aug 2026
    • Avoid duplicate MCP approval request references when continuing stored OpenAI Responses.

  18. 4.0.39

    11 Aug 2026

    Only updates a dependency:@ai-sdk/provider-utils 5.0.27

  19. 4.0.38

    11 Aug 2026
    • Keep client-executed function calls paired with their outputs when chaining OpenAI Responses with a previous response ID.

  20. 4.0.37

    10 Aug 2026

    Only updates a dependency:@ai-sdk/provider-utils 5.0.26

  21. 4.0.36

    7 Aug 2026
    • openai: Serialize tool text outputs when an output schema is configured

    • 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'.

  22. 4.0.35

    7 Aug 2026

    Only updates a dependency:@ai-sdk/provider-utils 5.0.24

  23. 4.0.34

    7 Aug 2026
    • provider/openai: Correlate rotating Responses API item IDs by output index

  24. 4.0.33

    6 Aug 2026
    • openai: Support batch APIs with experimental_startTextBatch

  25. 4.0.31 – 4.0.322 releases that only update dependencies@ai-sdk/provider 4.0.6@ai-sdk/provider-utils 5.0.23Show each
  26. 4.0.30

    4 Aug 2026
    • Fix streamed tool calls with non-zero, non-contiguous, reused, or missing indexes.

  27. 4.0.27 – 4.0.293 releases that only update dependencies@ai-sdk/provider-utils 5.0.20@ai-sdk/provider 4.0.5Show each
  28. 4.0.26

    31 Jul 2026
    • Serialize file upload expiry settings in the multipart field shape accepted by OpenAI.

  29. 4.0.25

    30 Jul 2026
    • 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.

    • Add experimental_toolCaller routing to generateText for code mode

  30. 4.0.24

    29 Jul 2026

    Only updates a dependency:@ai-sdk/provider-utils 5.0.15

  31. 4.0.23

    28 Jul 2026
    • Add blocked domain filters to the OpenAI and Azure Responses API web search tools.

  32. 4.0.22

    28 Jul 2026
    • 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).

  33. 4.0.20

    23 Jul 2026
    • Add OpenAI Responses Programmatic Tool Calling with hosted program tools, function caller controls, structured output schemas, and multi-step continuation support.

  34. 4.0.19

    23 Jul 2026
    • Apply reasoning, service tier, and image defaults to recognizable future OpenAI model family versions.

  35. 4.0.18

    22 Jul 2026
    • Preserve stored tool search output item IDs from provider metadata.

  36. 4.0.17

    21 Jul 2026

    Only updates a dependency:@ai-sdk/provider-utils 5.0.12

  37. 4.0.16

    17 Jul 2026
    • 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.

  38. 4.0.15

    15 Jul 2026
    • Add the client-executed OpenAI Responses API computer tool with batched actions and screenshot outputs.

  39. 4.0.14

    14 Jul 2026

    Only updates a dependency:@ai-sdk/provider-utils 5.0.10

  40. 4.0.13

    13 Jul 2026
    • 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.

    • Reject empty OpenAI, Anthropic, and Replicate base URLs with a helpful AI SDK
      invalid argument error.

  41. 4.0.11

    9 Jul 2026
    • provider/openai: Add GPT-5.6 reasoning and prompt cache controls

  42. 4.0.10

    9 Jul 2026
    • provider/openai,provider/gateway: Add gpt-5.6 model ids

  43. 4.0.9

    8 Jul 2026
    • 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.

  44. 4.0.8

    5 Jul 2026
    • Send inline image file parts in OpenAI chat requests as data URLs instead of bare base64 strings.

  45. 4.0.7

    2 Jul 2026
    • Add experimental streaming transcription support for transcription models, including OpenAI gpt-realtime-whisper and xAI WebSocket STT.

  46. 4.0.6

    2 Jul 2026

    Only updates a dependency:@ai-sdk/provider-utils 5.0.4