unstale

npm / @ai-sdk/google

@ai-sdk/google

What changed in @ai-sdk/google 2 to 7, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

45 breaking5 security16 deprecations98 new APIs and options1 performance24 behavior and defaults86 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/google 751 changes

Breaking changes 28

  • OpenTelemetry span collection moves out of the ai package into this package; install it and register an OpenTelemetry instance to receive traces.

    7.0.0upgrade guide

  • Top-level result properties including content, tool calls and results, files, sources, and warnings now accumulate values across every step; use finalStep for final-step-only values.

    7.0.0upgrade guide

  • Renames the tool callback option experimental_context to context and stabilizes it; tool context is scoped and typed from contextSchema.

    7.0.0upgrade guide

  • Types, classes, and functions containing GoogleGenerativeAI have been renamed to use Google, such as createGoogleGenerativeAI to createGoogle and GoogleGenerativeAIProvider to GoogleProvider.

    7.0.0upgrade guide

  • CommonJS exports are removed; consumers using require() must switch to ESM import syntax.

    4.0.0, 7.0.0release notesupgrade guide

  • The deprecated option has been removed; replace remaining usages with activeTools.

    7.0.0upgrade guide

  • Removes the tracer property from experimental_telemetry; pass a custom tracer to the OpenTelemetry constructor instead.

    7.0.0upgrade guide

  • Google provider types, classes, and functions whose names include GoogleGenerativeAI are renamed to use Google.

    7.0.0upgrade guide

  • Request bodies are no longer included in generateText and streamText step results by default; opt in with include.requestBody.

    7.0.0upgrade guide

  • generateText no longer includes response bodies by default; opt in with include.responseBody.

    7.0.0upgrade guide

  • The deprecated function has been removed; use isToolUIPart instead.

    7.0.0upgrade guide

  • Removes the deprecated top-level cachedInputTokens field; use inputTokenDetails.cacheReadTokens instead.

    7.0.0upgrade guide

  • Removes the deprecated top-level reasoningTokens field; use outputTokenDetails.reasoningTokens instead.

    7.0.0upgrade guide

  • The deprecated tool-result content part type has been removed; use the file content part shape for inline tool-result file content.

    7.0.0upgrade guide

  • Raises the minimum supported Node.js version to 22; supported versions are 22, 24, and 26.

    4.0.0, 7.0.0release notesupgrade guide

  • Renames the telemetry integration callback and tracing-channel event type from onEmbedFinish to onEmbedEnd.

    7.0.0upgrade guide

  • Renames the per-call completion callback for embed and embedMany from experimental_onFinish to onEnd.

    7.0.0upgrade guide

  • Renames the per-call completion callback for rerank from experimental_onFinish to onEnd.

    7.0.0upgrade guide

  • The callback follows the result changes: usage and content-related properties include all steps, while final-step-only properties are available on finalStep.

    7.0.0upgrade guide

  • Renames the telemetry integration callback and tracing-channel event type from onRerankFinish to onRerankEnd.

    7.0.0upgrade guide

  • Renames the per-step lifecycle callback from onStepFinish to onStepEnd across generation, streaming, object APIs, agents, and UI message stream helpers. Telemetry integrations should implement onStepEnd.

    7.0.0upgrade guide

  • Register a telemetry integration globally at application startup to receive OpenTelemetry traces.

    7.0.0upgrade guide

  • Each StepResult now contains only response messages produced by that step, rather than accumulated messages; use result.responseMessages for the full history.

    7.0.0upgrade guide

  • onChunk now receives every TextStreamPart, including lifecycle, boundary, and terminal parts; handlers that assume the former subset should guard chunk types.

    7.0.0upgrade guide

  • Configure tool approval on the generation call or agent, allowing approval policy to vary by request.

    7.0.0upgrade guide

  • The deprecated type has been removed; replace imports and type references with ToolExecutionOptions.

    7.0.0upgrade guide

  • Pass tool-specific context values through toolsContext, keyed by tool name; when any tool declares contextSchema, toolsContext becomes required and includes only contextual tools.

    7.0.0upgrade guide

  • generateText and streamText results now report token usage accumulated across all steps; use finalStep.usage for final-step-only usage.

    7.0.0upgrade guide

Deprecations 14

  • Tool-result file content now has a canonical file variant with tagged data and a required mediaType; legacy variants are runtime auto-migrated.

    7.0.0upgrade guide

  • The old names remain available as deprecated aliases; migrate references to the renamed Google identifiers.

    7.0.0upgrade guide

  • The user-message image content part is deprecated; use a file part with an image mediaType instead.

    7.0.0upgrade guide

  • The tool-level property on tool() and dynamicTool() is deprecated; move approval logic to toolApproval on the call or agent.

    7.0.0upgrade guide

  • Renames the final lifecycle callback from onFinish to onEnd for text generation, streaming, agents, and ToolLoopAgent settings. The old name remains a deprecated alias, and onEnd takes precedence when both are provided.

    7.0.0upgrade guide

  • Renames experimental_onToolCallFinish for generateText and streamText; the old name remains a deprecated fallback.

    7.0.0upgrade guide

  • Renames experimental_onToolCallStart for generateText and streamText; the old name remains a deprecated fallback.

    7.0.0upgrade guide

  • The streamText result method is deprecated; use the stateless top-level helper instead.

    7.0.0upgrade guide

  • The top-level final-step reasoning property on generateText and streamText results is deprecated; read it from finalStep instead.

    7.0.0upgrade guide

  • Renames the full event stream returned by streamText from fullStream to stream; fullStream remains a deprecated alias.

    7.0.0upgrade guide

  • The property is deprecated; use usage, which now reports usage across all steps.

    7.0.0upgrade guide

  • The streamText result method is deprecated; use stateless text-stream helpers instead.

    7.0.0upgrade guide

  • The streamText result method is deprecated; use the stateless top-level helper with a stream instead.

    7.0.0upgrade guide

  • The streamText result method is deprecated; use stateless stream helpers and createUIMessageStreamResponse instead.

    7.0.0upgrade guide

New APIs and options 6

  • Declare each tool's context fields with contextSchema; tool() infers the context type, limiting callbacks to declared fields.

    7.0.0upgrade guide

  • Use finalStep to access final-step-only result properties, including usage and metadata.

    7.0.0upgrade guide

  • Moves the streamText raw-chunk option from top-level includeRawChunks into include.rawChunks; the old option remains deprecated.

    7.0.0upgrade guide

  • Adds support for the reasoning-file type for files that are part of reasoning.

    4.0.0, 7.0.0release notesupgrade guide

  • The top-level option is the provider-agnostic way to control reasoning effort; overlapping providerOptions settings take precedence if both are present.

    7.0.0upgrade guide

  • Use runtimeContext for shared generation or agent state visible to prepareStep, events, and step results, separating it from tool-specific context.

    7.0.0upgrade guide

Behavior and default changes 3

  • Renames experimental_include to include for generateText, streamText, and ToolLoopAgent; the old name remains supported as a deprecated alias, and include takes precedence.

    7.0.0upgrade guide

  • Once a telemetry integration is registered, AI SDK calls emit telemetry events by default; set isEnabled to false on a call to opt out.

    7.0.0upgrade guide

  • Renames experimental_telemetry to telemetry. The old name remains a deprecated alias during the migration window.

    7.0.0upgrade guide

@ai-sdk/google 62 changes

Breaking changes 2

  • Provider shorthand textEmbedding has been renamed to embedding; update calls to the Google provider.

    6.0.0upgrade guide

  • Provider method textEmbeddingModel has been renamed to embeddingModel; update calls to the Google provider.

    6.0.0upgrade guide

@ai-sdk/google 4158 changes

Breaking changes 11

  • Structured output schemas are rejected in batch requests because inline Google batch requests ignore responseJsonSchema.

    4.0.122release notes

  • When toolChoice is none, all Google Interactions tools are omitted, including provider-defined tools.

    3.0.141, 4.0.111release notesrelease notes

  • Affected error paths that previously reported other now report error.

    4.0.103release notes

  • 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

  • The baseUrl option was removed from all providers; use baseURL instead.

    4.0.0upgrade guide

  • The Google facade was removed; use the google object or createGoogleGenerativeAI function instead.

    4.0.0upgrade guide

  • Removes the GenerativeAI affix from Google types and classes for consistency; renamed exported symbols retain deprecated aliases.

    4.0.0release notes

  • Google requests to response-supplied URLs attach credentials only when the URL is same-origin with the configured API origin.

    4.0.0release notes

  • The model-specific topK setting was removed from the Google Generative AI provider; use the standard topK setting instead.

    4.0.0upgrade guide

Security 5

  • MCP server header credentials are redacted in tool telemetry; Interactions request bodies also redact credentials for provider error reporting, while actual requests retain them.

    4.0.122release notes

  • Keep these downloads separate from provider authentication wrappers so file hosts do not receive Azure bearer tokens or Vertex Express Mode API keys.

    4.0.119release notes

  • Add a fetch option so downloads can use a configured transport, including guarded-fetch for opt-in DNS validation on Node.js.

    4.0.119release notes

  • When toolChoice is none, Google provider-defined tools are omitted to prevent data retrieval or server-side execution; function declarations needed by conversation history are preserved while function calling is disabled.

    2.0.109, 3.0.142, 4.0.114release notesrelease notesrelease notes

  • 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 61

  • Adds experimental extraction models backed by structured language model output.

    4.0.120release notes

  • Add the gemini-4-hydrogen model ID.

    3.0.146, 4.0.119release notesrelease notes

  • Support Hydrogen's xhigh thinking level in Google Generate Content and Interactions provider options, and map portable reasoning xhigh to it only for Hydrogen models.

    4.0.119release notes

  • Adds support for the gemini-4-carbon model with the same capabilities as gemini-4-argon.

    2.0.111, 3.0.145, 4.0.117release notesrelease notesrelease notes

  • Google and Vertex AI Interactions requests, including streaming, now pass through labels so callers can attach request metadata such as safety_identifier.

    3.0.143, 4.0.114release notesrelease notes

  • File parts support videoMetadata; per-file providerOptions can pass startOffset, endOffset, and fps to control video clipping and frame rate with Google and Google Vertex providers.

    3.0.140, 4.0.108release notesrelease notes

  • Provider metadata now preserves grounding metadata in request order for each automatically continued Google response, using null for requests without grounding.

    2.0.104, 4.0.100release notesrelease notes

  • 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

  • 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

  • Supports combining built-in tools with function calling on Gemini 3.

    4.0.0release notes

  • Adds fileData support to the embedding model.

    4.0.0release notes

  • Adds a new finishMessage field in providerMetadata.

    4.0.0release notes

  • Adds the gemini-3.5-flash model.

    4.0.0release notes

  • Adds the gemini-embedding-2-preview model and fixes multimodal embedding support with embedMany.

    4.0.0release notes

  • Adds the gemini-embedding-2, deep-research-max-preview-04-2026, and deep-research-preview-04-2026 models.

    4.0.0release notes

  • Adds provider options for Google realtime Live Translation with gemini-3.5-live-translate-preview.

    4.0.0release notes

  • Adds support for the Gemini Interactions API.

    4.0.0release notes

  • Supports cancelling long-running Interactions API agents via AbortSignal and processes their intermittent stream.

    4.0.0release notes

  • Adds support for managed agents in the Interactions API.

    4.0.0release notes

  • Adds support for multimodal content parts in embedding provider options.

    4.0.0release notes

  • Adds support for provider references and uploading files as supported per provider.

    4.0.0release notes

  • Adds experimental realtime support for voice conversations, including Google provider support in server and browser environments.

    4.0.0release notes

  • Adds a top-level reasoning parameter supported by generateText and streamText.

    4.0.0release notes

  • Adds support for the service tier parameter.

    4.0.0release notes

  • Adds Gemini text-to-speech (speech) model support.

    4.0.0release notes

Performance 1

Behavior and default changes 16

  • Known model ID suggestions are derived from provider model catalog declarations, so catalog updates automatically update autocomplete while preserving existing suggestions, endpoint-specific lists, and custom model IDs.

    4.0.121release notes

  • The hook can use the function returned by createDownload and now handles generated file URLs as well as other core downloads.

    4.0.119release notes

  • Google decision models now use the native Gemini decisions API.

    4.0.118release notes

  • API key and token settings now support promises and synchronous or asynchronous callbacks, resolving credentials per authenticated request while preserving existing authentication behavior and synchronous credential serialization.

    4.0.109release notes

  • Top-level reasoning now maps to supported provider levels, and unsupported none settings map to the model's lowest level with a compatibility warning; Gemini 2.5 Pro and Gemini 3 mappings are specifically affected.

    4.0.108release notes

  • Google Generate Content and Interactions streams that end cleanly without a provider completion signal now report interrupted, preserving partial output without emitting an error solely for the interruption.

    4.0.103release notes

  • 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

  • Supports Google search grounding when using generateImage with Gemini.

    4.0.0release notes

  • Supports multimodal tool-result content by mapping media parts into functionResponse.parts; remote HTTP(S) URLs are not supported.

    4.0.0release notes

  • Reads serviceTier from the Gemini API response header and uses PayGo for Vertex.

    4.0.0release notes

Fixes and other changes 64

  • Provider metadata now includes promptFeedback.blockReasonMessage.

    4.0.122release notes

  • Google Interactions now maps top-level reasoning in generation and streaming calls to supported thinking levels, preserves explicit thinkingLevel overrides and API defaults, and warns when reasoning is unsupported.

    4.0.121release notes

  • Custom download requests receive the call's abort signal, preserving cancellation and timeouts for prompt assets and generated files.

    4.0.119release notes

  • Streaming now emits File Search and RAG document sources, deduplicated by document URI or File Search store and title so distinct documents with matching titles and filenames are preserved.

    4.0.118release notes

  • Dotted numeric paths now receive contiguous array-index validation while numeric object keys and valid contiguous array updates are preserved.

    3.0.144, 4.0.116release notesrelease notes

  • Generated and streamed responses preserve the served service tier from this response header when usage metadata omits it.

    3.0.144, 4.0.116release notesrelease notes

  • Streamed tool-call array indexes that leave a gap are skipped, preventing a small response from building a huge sparse array.

    3.0.143, 4.0.114release notesrelease notes

  • Omits foreign-provider empty signature text when replaying history through Anthropic or Bedrock, preserving Bedrock’s native reasoning-history handling.

    4.0.112release notes

  • GoogleRealtimeModel now supports this contract, returning the unconstrained Gemini Live endpoint with resolved credential headers; each server connection can create its own event parser.

    4.0.112release notes

  • Explicit speech language codes are forwarded to Gemini TTS for single- and multi-speaker requests, including the shared Vertex Gemini adapter; omitted languages and 'auto' retain automatic detection.

    4.0.112release notes

  • Keeps provider metadata on empty text parts when converting results to response messages, allowing it to be passed back in subsequent requests.

    4.0.112release notes

  • Preserves the order of text and complete function calls, including standalone thought signatures on empty text or reasoning parts.

    4.0.112release notes

  • Realtime usage snapshots use custom events with rawType and typed usage; completion-frame usage is attached to response-done, preserving lifecycle ordering without inferring response associations.

    4.0.112release notes

  • Parses string functionCall arguments.

    2.0.108, 3.0.141, 4.0.110release notesrelease notesrelease notes

  • Handles cycles and BigInt values in functionResponse.

    2.0.108, 3.0.141, 4.0.110release notesrelease notesrelease notes

  • Maps Google RPC status names to HTTP status codes when streamed errors lack a numeric code, marking transient failures such as UNAVAILABLE and RESOURCE_EXHAUSTED retryable.

    2.0.108, 3.0.141, 4.0.110release notesrelease notesrelease notes

  • String values in streamed tool-call input are now closed on the final chunk.

    4.0.108release notes

  • Empty arrays and objects in tool-call input are now preserved when streamed, instead of being dropped.

    4.0.105release notes

  • Provider-returned identifiers are encoded in credentialed follow-up request paths.

    4.0.102release notes

  • 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

  • Emits Vertex no-argument streaming tool calls as complete tool calls with '{}' input and propagates thoughtSignature metadata.

    4.0.0release notes

  • Uses VALIDATED function calling mode when any tool has strict:true.

    4.0.0release notes

  • Supports functionCall.id returned by Gemini and provides the matching functionResponse.id.

    4.0.0release notes

  • Preserves groundingMetadata and urlContextMetadata when they arrive in a stream chunk before the finishReason chunk.

    4.0.0release notes

  • Correctly marks reasoning files as such and fixes related multi-turn errors.

    4.0.0release notes

  • Reads serviceTier from usageMetadata in both generate and stream paths, so streaming responses no longer report null.

    4.0.0release notes

  • Automatically injects skip_thought_signature_validator for Gemini 3 tool-call replays without a signature.

    4.0.0release notes

  • Preserves per-modality token details in usage data.

    4.0.0release notes

@ai-sdk/google 341 changes

Breaking changes 2

  • Schema conversion now enforces limits on visited JSON values, serialized size, and depth, failing with a controlled error when a schema exceeds them.

    3.0.143release notes

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

    3.0.132release notes

Deprecations 2

  • The textEmbedding alias is deprecated in favor of embeddingModel.

    3.0.0release notes

  • The textEmbeddingModel alias is deprecated in favor of embeddingModel.

    3.0.0release notes

New APIs and options 19

  • Adds a download size limit for Google Vertex tool result files, defaulting to 7 MiB; raise it for larger files.

    3.0.147release notes

  • Adds support for Hydrogen's xhigh thinking level in Google Generate Content and Interactions provider options.

    3.0.146release notes

  • Adds an array that preserves grounding metadata in request order, including null for requests without grounding.

    3.0.136release notes

  • Google and Anthropic providers support a custom provider name.

    3.0.0release notes

  • Provides embeddingModel as the embedding model method; textEmbeddingModel and textEmbedding remain as deprecated aliases.

    3.0.0release notes

  • Adds the enterpriseWebSearch tool.

    3.0.0release notes

  • Adds Gemini 3 Flash support.

    3.0.0release notes

  • Adds Gemini 3 Pro support.

    3.0.0release notes

  • Adds the gemini-3-pro-image-preview model ID.

    3.0.0release notes

  • Adds the gemini-3-pro-preview model ID.

    3.0.0release notes

  • Adds Google Maps grounding tool support for location-aware Gemini responses.

    3.0.0release notes

  • Adds a Google Vertex RAG Engine grounding provider tool.

    3.0.0release notes

  • Adds the Google File Search tool.

    3.0.0release notes

  • Adds imageConfig.aspectRatio configuration for Gemini models.

    3.0.0release notes

  • Adds support for the imageSize provider option.

    3.0.0release notes

  • Adds mediaResolution and passes it to the Google API.

    3.0.0release notes

  • Exposes promptFeedback outputs.

    3.0.0release notes

  • Adds the thinking_level option for Gemini 3 models.

    3.0.0release notes

  • Adds support for trafficType in Vertex AI provider usageMetadata.

    3.0.0release notes

Fixes and other changes 18

  • Empty arrays and objects in streamed tool-call input are now preserved when Vertex sends a value-less partialArgs entry.

    3.0.139release notes

  • Converts type arrays containing "null" to a plain nullable node, so adjacent items and format remain valid for Gemini.

    2.0.106, 3.0.138release notesrelease notes

  • 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

  • Preserves nested empty object schemas in tool parameters to fix validation errors for required properties with empty object types.

    3.0.0release notes

  • Fixes using Google Search together with URL context in Vertex AI.

    3.0.0release notes

  • Handles File Search retrievedContext using fileSearchStore as well as the older uri format, preventing Zod validation errors.

    3.0.0release notes

  • Preserves thoughtSignature through tool execution, fixing missing thought_signature errors with Gemini thinking models on Google Vertex.

    3.0.0release notes

  • Retrieves thoughtSignature using the dynamic providerOptionsName, fixing multi-step tool calls with Gemini thinking models on Google Vertex.

    3.0.0release notes

  • Preserves nested empty object schemas and descriptions in tool parameters, avoiding validation errors for required properties with empty object types.

    3.0.0release notes

@ai-sdk/google 223 changes

Breaking changes 2

New APIs and options 12

Behavior and default changes 5

  • embed uses the single embeddings endpoint to avoid rate limits associated with batch requests; no code updates are needed.

    2.0.0release notes

  • Adds support for Gemini 2.5 Flash, now stable.

    2.0.0release notes

  • Adds Gemini 2.5 Flash Lite GA.

    2.0.0release notes

  • System messages are omitted for Gemma models, and system instructions are handled automatically.

    2.0.0release notes

  • Google embedding models switch to using providerOptions.

    2.0.0release notes

Fixes and other changes 4

  • Supports tool schemas that allow additional properties, such as z.record(z.string()).

    2.0.0release notes

  • Unsupported additionalProperties is omitted from schemas sent in Google API request payloads.

    2.0.0release notes

  • Fixes grounding streaming sources.

    2.0.0release notes

  • Accepts nullish values in safetyRatings.

    2.0.0release notes