Packages

@ai-sdk/provider

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

Upgrading @ai-sdk/provider From 4.0.36 to 4.0.39

3 releases in betweenevery note read

Reading releases, release notes and advisories…

0
changes to make
0
advisories fixed
2
new
5
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.

1 internal line (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.