Packages

@ai-sdk/google

4.0.122 · 17 Nov 2026Apache-2.014.6M / weekRepositoryHomepagenpmAtom feed

Your version

497 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.

  1. 4.0.122

    17 Nov 2026
    • google: Reject structured output schemas in batch requests because inline Google batch requests ignore responseJsonSchema

    • provider/google: Redact MCP server credentials in telemetry

      Google Interactions MCP server headers can contain connector credentials, which
      were recorded in tool telemetry. google.tools.mcpServer now provides a
      redacted telemetry view of its header values, and Interactions request bodies do
      the same for provider error reporting, while the actual request keeps the
      credentials.

    • google: Include promptFeedback.blockReasonMessage in provider metadata

  2. 4.0.121

    13 Nov 2026
    • Derive known model ID suggestions from each provider's model catalog declarations so catalog updates automatically update autocomplete, while preserving existing suggestions, endpoint-specific model lists, and support for custom model IDs.

    • Fix Google Interactions ignoring top-level reasoning in generation and streaming calls. Map reasoning to model-supported thinking levels, including Hydrogen's xhigh, preserve explicit thinkingLevel overrides and API defaults, and warn when reasoning is unsupported.

  3. 4.0.120

    13 Nov 2026
    • Add experimental extraction models backed by structured language model output

  4. 4.0.119

    12 Nov 2026
    • 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.

      Keep Azure image and Vertex tool-result downloads separate from provider authentication wrappers so file hosts never receive Azure bearer tokens or Vertex Express Mode API keys.

      Pass the call's abort signal to custom download requests, including prompt assets and generated files, so experimental_download: createDownload({ fetch }) preserves cancellation and timeouts.

    • Add the gemini-4-hydrogen model ID and support Hydrogen's xhigh thinking level in Google Generate Content and Interactions provider options. Map portable reasoning: 'xhigh' to xhigh only for Hydrogen models.

  5. 4.0.118

    11 Nov 2026
    • Use the native gemini decisions api for google decision models

    • Emit File Search and RAG document sources when streaming. Deduplicate by document URI or File Search store and title so distinct documents with matching titles and filenames are preserved.

  6. 4.0.117

    10 Nov 2026
    • Add support for the gemini-4-carbon model with the same capabilities as gemini-4-argon.

  7. 4.0.116

    10 Nov 2026
    • Preserve the served service tier from the x-gemini-service-tier response header when usage metadata omits it, for generated and streamed responses.

    • Apply contiguous array-index validation to dotted numeric paths in streamed tool arguments, while preserving numeric object keys and valid contiguous array updates.

  8. 4.0.114

    7 Nov 2026
    • Add resolveProviderOptions to parse provider options that a model accepts under several providerOptions keys, either as aliases (first) or merged in order (merge), and use it for the existing multi-key lookups in the OpenAI, OpenAI-compatible, Anthropic, Google, and Amazon Bedrock models. Resolution behavior for these models is unchanged.

    • Pass providerOptions.google.labels through to Google and Vertex AI Interactions requests, including streaming, so callers can attach request metadata such as safety_identifier.

    • Omit Google provider-defined tools, including File Search and Vertex RAG Store, when toolChoice is none so disabled tools cannot retrieve data or execute server-side. Preserve function declarations needed by conversation history while disabling function calling. This also applies when structured output uses a synthetic JSON response tool.

  9. 4.0.113

    6 Nov 2026
    • Refactor Google Vertex model ID logic into a model catalog that declares capabilities and provider options, and generate provider capability documentation from it. Export Google catalog metadata internally for Vertex to reuse. Request behavior is unchanged.

  10. 4.0.112

    5 Nov 2026
    • Preserve the order of text and complete function calls in streamed Google responses, including standalone thought signatures on empty text or reasoning parts.

      Keep provider metadata on empty text parts when converting results to response messages so it can be passed back in subsequent requests.

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

    • Pass through seed: 0 instead of dropping it in image and video models. KlingAI now reports seed: 0 as an unsupported setting like any other seed.

    • Feat (provider/google): implement server-side realtime extensions

      GoogleRealtimeModel supports the existing getServerWebSocketConfig() contract, returning the unconstrained Gemini Live endpoint with resolved credential headers. Each server connection can create its own event parser. Reported gross token totals include thinking and tool-use counts, with cached input portions and available modality counts normalized without guessing missing values. Usage in a completion frame is attached to response-done; other snapshots use custom events with rawType: 'usageMetadata' and typed usage, preserving lifecycle ordering without inferring response associations.

  11. 4.0.111

    3 Nov 2026
    • Omit all Google Interactions tools when toolChoice is none, including provider-defined tools.

  12. 4.0.110

    2 Nov 2026
    • google: Handle cycles and BigInt in functionResponse and parse string functionCall arguments

    • Map Google RPC status names to HTTP status codes when streamed errors omit a numeric code, so transient failures such as UNAVAILABLE and RESOURCE_EXHAUSTED are marked retryable.

  13. 4.0.109

    30 Oct 2026
    • Support promises and synchronous or asynchronous callbacks in provider API key and token settings. Resolve credentials per authenticated request while preserving existing authentication behavior and synchronous credential serialization.

      The experimental OpenAI Live getServerWebSocketConfig() method can now resolve asynchronously. Await its result before using the connection settings.

    • Consolidate Google language model capabilities and request policies into a model catalog shared by runtime resolution and generated documentation, preserving existing Google and Vertex request behavior.

  14. 4.0.108

    29 Oct 2026
    • Close string values in tool-call input streamed with streamFunctionCallArguments on their final chunk

    • Add videoMetadata support for file parts. Pass startOffset, endOffset, and fps through per-file providerOptions to control video clipping and frame rate with the Google and Google Vertex providers.

    • Map the top-level reasoning option consistently across providers

      Providers now resolve reasoning the same way:

      mapReasoningToProviderEffort now accepts any reasoning value, returns an optional providerOptionsEffort unchanged, and rounds levels that are missing from the effort map to the closest supported level. mapReasoningToProviderBudget maps 'none' to the minimum reasoning budget, always returns a budget, and uses the default percentage for levels missing from budgetPercentages. OpenAICompatibleChatConfig adds an optional mapReasoning function for mapping the top-level reasoning option.

  15. 4.0.106 – 4.0.1072 releases that only update dependencies@ai-sdk/provider-utils 5.0.70Show each
  16. 4.0.105

    24 Oct 2026
    • google: Keep empty arrays and objects in tool-call input streamed with streamFunctionCallArguments

      Vertex sends a value-less partialArgs entry for an empty container (e.g. $.tags), which was dropped, so `` and {} arguments went missing from the streamed tool-call input.

  17. 4.0.103

    22 Oct 2026
    • Report interrupted when a stream ends cleanly without its provider completion signal, preserving partial output without emitting an error solely for the interruption.

      This applies to OpenAI (Chat, Responses, and Completions), Anthropic, Google (Generate Content and Interactions), Alibaba, Amazon Bedrock Converse, Cohere, DeepSeek, Groq, Hugging Face Responses, Mistral Chat, Moonshot AI, Open Responses, Perplexity, and xAI Responses. It also covers cutoffs in later Anthropic messages and Google automatic continuations.

      Compatibility notice: These streams previously fell back to other or omitted the finish part. Applications must now handle interrupted in finish-reason switches, mappings, and custom validation. Check finishReason === 'interrupted' to detect incomplete responses; interruption alone does not trigger error handling.

      Explicit unknown completion reasons still map to other. Actual provider, parsing, and transport errors retain their error paths; affected error paths that previously left the finish reason as other now report error. OpenAI-compatible remains unchanged.

  18. 4.0.102

    21 Oct 2026
    • Add a shared encodePathSegment helper and use it to encode provider-returned identifiers in credentialed follow-up request paths.

    • Defer construction of provider validation schemas until first use to reduce package import time.

  19. 4.0.100

    19 Oct 2026
    • Preserve grounding metadata from each automatically continued Google response in groundingMetadataPerRequest. Previously, a later response without grounding could leave earlier Search queries absent from the final provider metadata even though their sources were returned. The new array preserves request order and includes null for requests without grounding.

  20. 4.0.99

    16 Oct 2026
    • google: Surface in-stream errors

  21. 4.0.98

    15 Oct 2026
    • provider/google: Allow AUDIO response modalities for Google language models

  22. 4.0.96 – 4.0.972 releases that only update dependencies@ai-sdk/provider 4.0.28@ai-sdk/provider-utils 5.0.61Show each
  23. 4.0.95

    13 Oct 2026
    • google: Add gemini-4-argon model id and long decode support for generateContent: requests that reach the per-request cap (CONTINUATION) are continued automatically with usage summed across requests and the first request's prompt token count exposed as providerMetadata.google.initialPromptTokenCount, and the continuationToken provider option / provider metadata resume responses that used up their maxOutputTokens budget. generateText with the Interactions API now polls background: true model calls until they finish.

  24. 4.0.94

    12 Oct 2026
    • google: Handle regional Gemini model IDs and valid thinking configurations

  25. 4.0.93

    8 Oct 2026
    • Map the top level embedding dimensions to provider settings

  26. 4.0.91

    7 Oct 2026
    • Preserve tool errors in OpenAI Chat Completions and Responses by wrapping their payloads in an error object. Send Google tool errors and denied executions under functionResponse.response.error.

  27. 4.0.89

    6 Oct 2026
    • Limit jsonl rows to 64mb during batch result downloads

    • google: Preserve file search custom metadata in retrieved context grounding chunks

    • google: Add the 'gemini-nano-banana-2.1' model ID

  28. 4.0.88

    5 Oct 2026
    • Rename evaluate to decide

    • groq,google: Use JSON response tool for structured outputs with tool calling

  29. 4.0.87

    30 Sep 2026
    • ai: Add telemetry to speech generation and transcription, including provider usage propagation and experimental streaming lifecycle callbacks

  30. 4.0.85

    28 Sep 2026
    • Use standards-compliant User-Agent header

  31. 4.0.84

    28 Sep 2026
    • google: Preserve realtime user utterances with independent IDs and cumulative transcripts, honor text-free transcription completion markers, and advance response IDs after interruption

  32. 4.0.83

    28 Sep 2026
    • google: Send the default Gemini Live thinkingLevel when thinkingConfig sets neither thinkingLevel nor thinkingBudget, and stop overwriting a raw generationConfig.thinkingConfig

    • provider: Advertise image model file and mask input support

      Use confirmed model IDs for capability declarations so unrecognized model names remain unknown. Include Together AI FLUX.2 Pro and Flex single-image editing, and allow asynchronous capability lookups and middleware overrides to resolve to unknown.

      Advertise QuiverAI Arrow 2 and Arrow 2 Telos file-input support, and mark Together AI Gemini image inputs unsupported by the current single-image request mapping.

  33. 4.0.82

    25 Sep 2026
    • google: Forward supported Vertex tool result URLs as function response file data

  34. 4.0.80

    24 Sep 2026
    • google: Serialize JSON Schema references in function responses

  35. 4.0.79

    23 Sep 2026
    • Fix Google embedMany calls with more than 100 values by keeping per-value multimodal content aligned across automatic batches, including text-only entries. Validate content length before sending requests and validate each batch's provider options after middleware transforms them.

    • google: Preserve code execution parts when replaying messages

    • Add Gemini 3.8 TTS support with structured speech metadata and per-turn speaker and style controls for prebuilt voices. Preserve native WAV responses without adding a second header, support explicit raw PCM, mu-law, and A-law output, and identify headerless audio formats correctly. Add the Gemini 3.8 speech model IDs to Google and Gateway types.

      Share transcript and custom-voice inspection through the Google provider internal export, and reject empty speech transcripts before sending a request. Default newer and custom model IDs to structured speech while preserving the legacy format for Gemini 2.5 and 3.1.

  36. 4.0.78

    23 Sep 2026
    • provider: Preserve opaque file URI strings for provider serialization

  37. 4.0.77

    22 Sep 2026
    • google: Preserve image candidate finish reasons in provider metadata

  38. 4.0.76

    18 Sep 2026

    Only updates a dependency:@ai-sdk/provider-utils 5.0.45

  39. 4.0.75

    18 Sep 2026
    • google: Advertise the supported Gemini image per-call limit

    • google: Ignore default prompt block reasons in non-streaming responses

    • google: Include tool-use prompt tokens in input usage

  40. 4.0.74

    16 Sep 2026
    • Add google.evaluationModel() for experimental Choice, Score, and Boolean evaluations through Gemini structured output, preserving provider thinking options and validating exact labels and score bounds. Boolean answers contain prompted P(true) estimates validated to be in [0, 1]. Boolean estimates are not guaranteed to be calibrated; application code chooses thresholds.

  41. 4.0.73

    16 Sep 2026
    • google: Preserve prompt feedback and metadata across streaming chunks

    • Keep default Node.js downloads protected by DNS validation and connection pinning when frameworks or instrumentation wrap global fetch before or after the SDK loads.

  42. 4.0.72

    15 Sep 2026
    • google: Realtime session options for Gemini 3.8 Live

      Add thinkingConfig (thinkingLevel, thinkingBudget, includeThoughts) and defaultToolBehavior to GoogleRealtimeModelOptions. thinkingConfig is merged into the Live setup.generationConfig. Background-reasoning Live models such as gemini-3.8-live-extended-thinking require exactly one of thinkingLevel or thinkingBudget, so the provider sends thinkingLevel: 'low' on those models when neither is set. defaultToolBehavior stamps behavior on every function declaration in the setup.

      Forward the Live interactionStatus and waitingForInput server messages as custom events so applications can tell when a background-reasoning model is idle, since turnComplete alone no longer means that.

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.