unstale

npm / @ai-sdk/gateway

@ai-sdk/gateway

What changed in @ai-sdk/gateway 2 to 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.

3 breaking16 new APIs and options12 behavior and defaults1 tooling9 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

@ai-sdk/gateway 422 changes

Breaking changes 3

  • Arrays passed directly as state now contain decision state parts; wrap JSON arrays in an object or a json part.

    4.0.108release notes

  • The API name evaluate was renamed to decide.

    4.0.104release notes

  • Unsupported batch request types are now rejected.

    4.0.79release notes

New APIs and options 9

Behavior and default changes 4

  • The gateway sends image files in decision state.

    4.0.110release notes

  • Decision refusals are reported as refusal answers.

    4.0.106release notes

  • Conditional evaluation fallback models with any non-empty value are now accepted.

    4.0.96release notes

  • The has provider option now supports quantization conditions.

    4.0.91release notes

Tooling 1

  • Conditional evaluation fallbacks are now typed in the Gateway provider.

    4.0.95release notes

Fixes and other changes 5

  • Batch result downloads limit JSONL rows to 64 MB.

    4.0.105release notes

  • getCredits() now forwards the configured team as a query parameter, preventing authentication errors for credentials that can access multiple teams.

    4.0.102release notes

  • getAvailableModels() now includes evaluation models instead of filtering them out as unknown model types.

    4.0.85release notes

  • The gateway provider now forwards server-returned warnings in doGenerate instead of overwriting them with an empty array.

    2.0.151, 3.0.193, 4.0.80release notesrelease notesrelease notes

  • Preserves retryability returned by the AI Gateway for image results.

    4.0.77release notes

@ai-sdk/gateway 311 changes

New APIs and options 6

Behavior and default changes 4

  • generateText with the Interactions API now polls background model calls until they finish.

    3.0.213release notes

  • Requests that reach the per-request CONTINUATION cap continue automatically, with usage summed across requests.

    3.0.213release notes

  • The has provider option now accepts structured-output.

    2.0.159, 3.0.202release notesrelease notes

  • Retryability classification is provider-independent and preserved through the AI Gateway; Google and Google Vertex content-filtered results are terminal.

    3.0.191release notes

Fixes and other changes 1

  • Unclassified empty image results are retried, and retry-attempt accounting is preserved.

    3.0.191release notes

@ai-sdk/gateway 28 changes

New APIs and options 1

  • Adds a provider option and provider metadata for resuming responses that used up their maxOutputTokens budget.

    2.0.166release notes

Behavior and default changes 4

  • Requests that reach the per-request CONTINUATION cap are continued automatically, with usage summed across requests and the first request's prompt token count exposed.

    2.0.166release notes

  • Thinking can be disabled up to high effort; when disabled, xhigh and max effort are lowered to high with a warning.

    2.0.164release notes

  • Thinking token budgets are unsupported; enabled thinking with budgetTokens is converted to adaptive thinking with a warning.

    2.0.164release notes

  • Adds provider-independent retryability classification and preserves it through the AI Gateway.

    2.0.149release notes

Fixes and other changes 3

  • Diagnostics from completed attempts are preserved, making them available after retries.

    2.0.149release notes

  • Unclassified empty image results are retried, changing how image-generation failures are handled.

    2.0.149release notes

  • Google Vertex RAI-filtered results are marked terminal, so they are not treated as retryable.

    2.0.149release notes