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@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.
The API name evaluate was renamed to decide.
Unsupported batch request types are now rejected.
New APIs and options 9
Adds support for the GPT-6.1 Sol model.
GatewayProviderOptions now accepts conditional evaluation fallbacks.
Gemini 3.8 speech model IDs were added to Gateway types.
Adds model IDs for GPT-6 Sol and Luna.
Adds support for cancelling batches with experimental_cancelBatch.
Adds the Grok 4.7 model ID.
The has model filter now supports reasoning.
The has model filter now supports tool-use.
Image generation requests are now supported in batches.
Behavior and default changes 4
The gateway sends image files in decision state.
Decision refusals are reported as refusal answers.
Conditional evaluation fallback models with any non-empty value are now accepted.
The has provider option now supports quantization conditions.
Tooling 1
Conditional evaluation fallbacks are now typed in the Gateway provider.
Fixes and other changes 5
Batch result downloads limit JSONL rows to 64 MB.
getCredits() now forwards the configured team as a query parameter, preventing authentication errors for credentials that can access multiple teams.
getAvailableModels() now includes evaluation models instead of filtering them out as unknown model types.
The gateway provider now forwards server-returned warnings in doGenerate instead of overwriting them with an empty array.
Preserves retryability returned by the AI Gateway for image results.
@ai-sdk/gateway 311 changes
New APIs and options 6
Adds a provider option for resuming responses that used up their maxOutputTokens budget.
Adds the gemini-4-argon model id.
Exposes the first request's prompt token count in Google provider metadata.
Adds Browserbase Search and Fetch tool support.
The has provider option now supports quantization conditions.
Model filtering with has now supports reasoning and tool-use.
Behavior and default changes 4
generateText with the Interactions API now polls background model calls until they finish.
Requests that reach the per-request CONTINUATION cap continue automatically, with usage summed across requests.
The has provider option now accepts structured-output.
Retryability classification is provider-independent and preserved through the AI Gateway; Google and Google Vertex content-filtered results are terminal.
Fixes and other changes 1
Unclassified empty image results are retried, and retry-attempt accounting is preserved.
@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.
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.
Thinking can be disabled up to high effort; when disabled, xhigh and max effort are lowered to high with a warning.
Thinking token budgets are unsupported; enabled thinking with budgetTokens is converted to adaptive thinking with a warning.
Adds provider-independent retryability classification and preserves it through the AI Gateway.
Fixes and other changes 3
Diagnostics from completed attempts are preserved, making them available after retries.
Unclassified empty image results are retried, changing how image-generation failures are handled.
Google Vertex RAI-filtered results are marked terminal, so they are not treated as retryable.