unstale

npm / @ai-sdk/google

@ai-sdk/google

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

4 breaking1 security39 new APIs and options7 behavior and defaults47 fixes and other

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

npx @unstale/cli init

@unstale/cli 0.1.1 on npm

@ai-sdk/google 487 changes

Breaking changes 3

  • Renames evaluate to decide.

    4.0.88release notes

  • Unsupported batch request types are now rejected.

    4.0.68release notes

  • Support for Imagen models and their integration was dropped following the API shutdown.

    4.0.49release notes

Security 1

  • Default Node.js downloads retain DNS validation and connection pinning when frameworks or instrumentation wrap global fetch before or after the SDK loads.

    2.0.101, 3.0.130, 4.0.73release notesrelease notesrelease notes

New APIs and options 39

  • Google language models can now use AUDIO response modalities.

    4.0.98release notes

  • Adds a provider option and provider metadata to resume responses that used up their maxOutputTokens budget.

    2.0.103, 3.0.132, 4.0.95release notesrelease notesrelease notes

  • Adds gemini-4-argon as a model id.

    2.0.103, 3.0.132, 4.0.95release notesrelease notesrelease notes

  • Exposes the first request's prompt token count in Google provider metadata.

    2.0.103, 3.0.132, 4.0.95release notesrelease notesrelease notes

  • Adds the gemini-nano-banana-2.1 model ID.

    2.0.102, 3.0.131, 4.0.89release notesrelease notesrelease notes

  • Adds the portable max reasoning level, widening LanguageModelV4CallOptions['reasoning'] and the derived ReasoningLevel type; exhaustive consumers must handle max.

    4.0.89release notes

  • Adds telemetry to speech generation and transcription, including provider usage propagation and experimental streaming lifecycle callbacks.

    4.0.87release notes

  • Adds Gemini 3.8 speech model IDs to Google and Gateway types.

    4.0.79release notes

  • Adds Gemini 3.8 TTS support with structured speech metadata and per-turn speaker and style controls for prebuilt voices.

    4.0.79release notes

  • Adds experimental Choice, Score, and Boolean evaluations through Gemini structured output, preserving provider thinking options and validating exact labels and score bounds. Boolean answers include prompted P(true) estimates validated to be in [0, 1], but are not guaranteed to be…

    4.0.74release notes

  • Adds an option that stamps behavior on every function declaration in the Live setup.

    4.0.72release notes

  • Forwards the Live server message as a custom event so applications can detect when a background-reasoning model is idle.

    4.0.72release notes

  • Adds thinkingLevel, thinkingBudget, and includeThoughts options, merged into the Live setup.generationConfig.

    4.0.72release notes

  • Forwards the Live server message as a custom event so applications can detect when a background-reasoning model is idle.

    4.0.72release notes

  • Image generation requests are now supported in batches.

    4.0.68release notes

  • Batch cancellation is now available.

    4.0.67release notes

  • Batch listing is now available.

    4.0.67release notes

  • Batch requests can now use per-request models.

    4.0.65release notes

  • Array outputs support the maxItems constraint.

    4.0.64release notes

  • Array outputs support the minItems constraint.

    4.0.64release notes

  • The Interactions API supports agentic video processing.

    4.0.63release notes

  • Adds the gemini-3.8-flash model for use with @ai-sdk/google.

    2.0.96, 3.0.121, 4.0.63release notesrelease notesrelease notes

  • Upload results now expose byteSize.

    4.0.61release notes

  • Adds createBinaryStreamResponseHandler to provider-utils.

    4.0.61release notes

  • Upload results now expose createdAt.

    4.0.61release notes

  • Adds deleteFromApi to provider-utils.

    4.0.61release notes

  • Upload results now expose expiresAt.

    4.0.61release notes

  • Adds abortSignal as a call option for FilesV4 operations.

    4.0.61release notes

  • Adds optional deleteFile support to the FilesV4 interface.

    4.0.61release notes

  • Adds optional streaming downloadFile support to the FilesV4 interface.

    4.0.61release notes

  • Adds optional getFileMetadata support to the FilesV4 interface.

    4.0.61release notes

  • Adds headers as a call option for FilesV4 operations.

    4.0.61release notes

  • Adds a { type: 'stream' } upload data variant.

    4.0.61release notes

  • Adds a helper for streaming multipart uploads with deterministic part ordering and failure-path stream teardown.

    4.0.61release notes

  • Batch now supports tool calling, allowing developers to use tools with batch requests.

    4.0.60release notes

  • Adds unary transcription via generateContent, with language detection, speaker diarization, word timestamps, and custom vocabulary.

    3.0.116, 4.0.54release notesrelease notes

  • Adds streaming transcription over the Live API WebSocket.

    4.0.54release notes

  • Adds VERBATIM and SMART transcription formatting modes for streaming transcription.

    3.0.116, 4.0.54release notesrelease notes

  • Adds support for the Gemini Batch API through experimental_startTextBatch.

    4.0.51release notes

Behavior and default changes 7

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

    2.0.103, 3.0.132, 4.0.95release notesrelease notesrelease notes

  • With the Interactions API, polls background model calls until they finish.

    4.0.95release notes

  • Newer and custom model IDs default to structured speech, while Gemini 2.5 and 3.1 retain the legacy format.

    4.0.79release notes

  • Input usage now includes tool-use prompt tokens.

    4.0.75release notes

  • Google and Google Vertex prompt blocks are now marked as terminal.

    4.0.65release notes

  • The core uploadFile() helper now forwards abortSignal and headers.

    4.0.61release notes

  • Prompt-level Google safety blocks without candidates are surfaced as content-filter results with prompt feedback metadata.

    2.0.94, 4.0.55release notesrelease notes

Fixes and other changes 37

  • In-stream errors are now surfaced.

    4.0.99release notes

  • Regional Gemini model IDs are handled.

    4.0.94release notes

  • Valid thinking configurations are handled.

    4.0.94release notes

  • Google tool errors and denied executions are sent under functionResponse.response.error.

    4.0.91release notes

  • JSONL rows are limited to 64 MB during batch result downloads.

    4.0.89release notes

  • Custom metadata is now preserved in retrieved context grounding chunks.

    3.0.131, 4.0.89release notesrelease notes

  • Uses a JSON response tool for structured outputs when tool calling is enabled.

    4.0.88release notes

  • Uses a standards-compliant User-Agent header.

    4.0.85release notes

  • Realtime user utterances retain independent IDs and cumulative transcripts.

    4.0.84release notes

  • Response IDs advance after interruption.

    4.0.84release notes

  • Text-free transcription completion markers are honored.

    4.0.84release notes

  • Gemini Live now sends the default thinkingLevel when thinkingConfig sets neither thinkingLevel nor thinkingBudget, and no longer overwrites a raw generationConfig.thinkingConfig.

    4.0.83release notes

  • Supported Vertex tool result URLs are forwarded as function response file data.

    4.0.82release notes

  • Fixes serialization of JSON Schema references in function responses.

    4.0.80release notes

  • Native WAV responses are preserved without adding a second header; explicit raw PCM, mu-law, and A-law output are supported, and headerless audio formats are identified correctly.

    4.0.79release notes

  • Code execution parts are preserved when messages are replayed.

    4.0.79release notes

  • Calls with more than 100 values keep per-value multimodal content aligned across automatic batches, including text-only entries; content length and each batch's provider options are validated before requests are sent.

    4.0.79release notes

  • Shares transcript and custom-voice inspection through the Google provider internal export.

    4.0.79release notes

  • Empty speech transcripts are rejected before a request is sent.

    4.0.79release notes

  • Preserve opaque file URI strings during provider serialization.

    2.0.98, 3.0.126, 4.0.78release notesrelease notesrelease notes

  • Image candidate finish reasons are preserved in provider metadata.

    4.0.77release notes

  • The provider now advertises the supported Gemini image per-call limit, helping developers determine the limit for image requests.

    4.0.75release notes

  • Default prompt block reasons are ignored in non-streaming responses.

    4.0.75release notes

  • Prompt feedback and metadata are preserved across streaming chunks.

    3.0.123, 4.0.73release notesrelease notes

  • On background-reasoning Live models, the provider sends thinkingLevel: 'low' when neither thinkingLevel nor thinkingBudget is set, meeting the requirement to provide exactly one.

    4.0.72release notes

  • Wraps non-object realtime tool results under output; object results pass through unchanged, as required by Gemini's Struct field.

    4.0.70release notes

  • Preserves JSON Schema instead of converting it to OpenAPI schema.

    4.0.70release notes

  • Fixes downloading file URLs from tool results.

    4.0.69release notes

  • Unclassified empty image results are now retried.

    4.0.65release notes

  • The Google provider maps the code execution tool name correctly.

    4.0.64release notes

  • Gemini Interactions now support video response formats.

    3.0.120, 4.0.59release notesrelease notes

  • Google Files URLs are now recognized when using a baseUrl.

    4.0.57release notes

  • Frequency and presence penalties are omitted from Gemini 2.5 requests because they are unsupported; warnings are returned instead.

    2.0.94, 4.0.56release notesrelease notes

  • Raw usage results preserve complete Google Generative Language usage metadata.

    3.0.119, 4.0.56release notesrelease notes

  • Local JSON Schema references are inlined in Google tool and structured-output schemas.

    2.0.89, 3.0.111, 4.0.48release notesrelease notesrelease notes

  • Handles empty string tool call IDs.

    4.0.47release notes

  • Uses low as the minimum reasoning level for full Gemini Flash 3.7 and later.

    4.0.46release notes

@ai-sdk/google 311 changes

Breaking changes 1

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

    3.0.132release notes

Fixes and other changes 10

  • For Vertex Gemini 3 and later, supported GCS tool result URLs are forwarded as function response file data for image, PDF, and text MIME types; HTTP(S) downloads remain supported on all Gemini generations.

    3.0.128release notes

  • Keeps per-value multimodal content aligned across automatic batches of more than 100 values, including text-only entries.

    3.0.127release notes

  • Validates content length before sending requests.

    3.0.127release notes

  • Validates each batch's provider options after middleware transforms them.

    3.0.127release notes

  • Default prompt block reasons are ignored in non-streaming responses.

    3.0.124release notes

  • Google content-filtered results are marked terminal, so they are not retried.

    3.0.122release notes

  • Unsupported frequency penalties are omitted from Gemini 2.5 requests, and a warning is returned.

    3.0.118release notes

  • Unsupported presence penalties are omitted from Gemini 2.5 requests, and a warning is returned.

    3.0.118release notes

  • Enum values are converted to the Gemini schema format.

    2.0.93, 3.0.116release notesrelease notes

  • Google model calls now preserve recursive tool input schemas instead of aborting.

    3.0.114release notes