Packages

@ai-sdk/provider

4.0.39 · 17 Nov 2026Apache-2.0107.4M / weekRepositoryHomepagenpmAtom feed

Upgrading @ai-sdk/provider From 4.0.5 to 4.0.39

34 releases in betweenevery note read

Reading releases, release notes and advisories…

  1. 4.0.5yours
  2. 33 releases
  3. 4.0.39target
0
changes to make
0
advisories fixed
33
new
14
fixes

Release by release

  1. 4.0.39

    17 Nov 20261 new
    • New

      Add extraction model support to provider registries, custom providers and string model ids

  2. 4.0.38

    12 Nov 20261 new · 4 fixes
    • New

      Add experimental extract api and extraction model spec

    • Fixed

      Prevent excessive memory and CPU usage when validating malformed UI messages. validateUIMessages, safeValidateUIMessages, and the agent UI stream helpers reported the issues of every part schema for every invalid part, so a small request with many malformed parts could exhaust memory. Each part is now validated against the schemas for its type only, validation stops at the first invalid message or part, and an invalid JSON value in provider or tool metadata is reported as a single issue.

    • Fixed

      Forward the provider's configured fetch transport when downloading file inputs. Add a fetch option to createDownload so core downloads can also use guarded-fetch for opt-in DNS validation on Node.js. The function returned by createDownload can now also be passed as experimental_download to generateText and streamText, and experimental_download now also handles generated file URLs returned by the model, so one hook covers all core downloads. Document that the default URL checks do not resolve DNS and recommend the guarded transport or network egress controls for untrusted URLs.

    • Fixed

      Warn when a UI message stream sends a tool error text that differs from the text the model received and then sends reasoning from a later step. By default, toUIMessageStream sends "An error occurred." to the client for a failed tool call, while the model receives the full error text during a multi-step call. Converting the stored UI messages back with convertToModelMessages then changes the tool result, and models that bind reasoning to the preceding messages (for example Anthropic models with preserved thinking) reject the request. The request still fails after this change; the warning and the updated documentation explain the cause and the available options.

    • Fixed

      Send the error text of failed tool calls to the client as the model received it.

  3. 4.0.37

    7 Nov 20261 fix
    • Fixed

      Fix TypeSafe decision requests with primitive JSON state by serializing those values as text, reject empty criteria and null or undefined Score levels before sending a request, and expose structured Score legends in provider metadata. Allow omitted or null Box instructions and null Boolean criteria in experimental decision question types.

  4. 4.0.36

    5 Nov 20265 new · 3 fixes
    • New

      Support native URL transcription with an optional provider capability, keeping existing file-generation contracts unchanged. Groq sends HTTP(S) audio URLs through its url parameter without downloading and re-uploading them, avoiding the attachment upload limit. Supplying a custom download function retains local download behavior.

    • New

      ai: Support provider-owned realtime transports

    • New

      Expose optional transcription word timings separately from segments and accept shared timestampGranularities. Explicit provider timing settings take precedence. OpenAI now sends timestamp_granularities only with verbose_json and warns when a requested timing is unavailable or excluded.

    • New

      Add typed streaming heartbeat parts. Anthropic emits them only with includePings: true (disabled by default), without requiring raw chunks. Core forwards pings through stream retries without storing them as generated content or sending them to UI message streams. Consumers with exhaustive stream-part switches must handle the new ping union variant when upgrading, even when the opt-in is disabled. Typed pings do not flush partial words during stream smoothing.

  5. 4.0.35

    30 Oct 20261 new
    • New

      Introduce a model entry contract with named capability sections and request configuration. Consolidate the OpenAI and Anthropic model catalogs so existing request behavior and generated capability documentation use the same source of truth. Catalogs also declare the provider options each provider accepts and which models support them.

  6. 4.0.34

    24 Oct 20261 fix
    • Fixed

      Fix non-streaming Responses API structured output failing when multiple assistant messages contain JSON. Providers can supply separate structured-output text for parsing, allowing OpenAI and Azure Responses models to select the last final_answer while preserving all generated content, annotations, conversation history, and token usage.

  7. 4.0.33

    22 Oct 20261 new
    • New

      provider: Add experimental streaming speech model spec

  8. 4.0.32

    22 Oct 20261 new
    • New

      Add the interrupted finish reason for provider streams that end without a completion signal. Preserve partial output without introducing an error solely for interruption, and stop tool execution, agent continuation, and automatic UI follow-ups for interrupted responses, including late tool results and approvals. Provider detection and emission will be added separately.

3 internal lines (docs, tests, tooling) left out.

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.