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.x · latest line
  2. 4.0.19

    20 Jul 2026
    • provider/google: Associate multiple code execution results with their tool call

    • provider/google: Surface Gemini responseId as response-metadata (stream) and response.id (generate)

  3. 4.0.18

    17 Jul 2026

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

  4. 4.0.17

    15 Jul 2026
    • provider/google: Forward Vertex-only imageConfig options (personGeneration, prominentPeople, imageOutputOptions)

  5. 4.0.16

    14 Jul 2026
    • Allow google.interactions agent requests to include supported tools, including file_search.

  6. 4.0.15

    14 Jul 2026

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

  7. 4.0.14

    13 Jul 2026
    • provider-utils: Validate provider-response URLs in getFromApi

      getFromApi now has a validateUrl flag. It is optional so existing callers keep compiling (omitting it behaves like false, i.e. no validation), but all AI SDK provider packages set it explicitly at every call site so each one makes a visible trust decision. When true, the URL is routed through fetchWithValidatedRedirects — the same guard used by downloadBlob — which rejects private/loopback/link-local targets, re-validates every redirect hop, strips proxy/metadata/cookie request headers, and drops all caller headers except the user-agent on cross-origin redirects (custom API-key headers must not follow a redirect off-origin any more than Authorization may); blocked URLs throw DownloadError. It is enabled at the image/video/audio download and polling call sites where the URL comes from a provider response body; URLs built from developer-configured endpoints pass validateUrl: false and are unaffected.

      A new optional credentialedOrigin withholds caller headers unless the URL is same-origin with it, so the API key is not sent to a response-supplied host on a different origin.

      A new optional trustedOrigin exempts URLs (and redirect hops) that are same-origin with the developer-configured provider endpoint from target validation, so self-hosted and localhost deployments whose response URLs point back at the configured host keep working; all other hops are still validated.

      Also closes range gaps in validateDownloadUrl (IPv4 224.0.0.0/4 multicast and the TEST-NET documentation ranges 192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24; IPv6 documentation ranges 2001:db8::/32 and 3fff::/20), and follows only the fetch-spec redirect status codes (301/302/303/307/308) — a Location header on any other status is not followed. This guard performs string/literal checks only and does not resolve DNS; hostnames that resolve to private addresses and DNS rebinding remain out of scope and must be constrained at the network layer (or by injecting a Node fetch that pins the resolved IP at connect time) for server deployments handling untrusted URLs. See contributing/secure-url-handling.md.

  8. 4.0.12

    10 Jul 2026
    • Forward text file references as documents when using the Google Interactions API.

  9. 4.0.11

    9 Jul 2026
    • Fix Google tool result conversion to send file data as inline data instead of JSON text on the legacy tool-result path.

    • Expand standalone Google threshold provider options into safety settings.

    • Feat (video): support video (not just image) reference inputs in inputReferences for reference-to-video generation

  10. 4.0.10

    8 Jul 2026

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

  11. 4.0.9

    7 Jul 2026
    • Pass documented Gemini external HTTPS file URLs through without downloading them.

  12. 4.0.8

    2 Jul 2026
    • Add experimental streaming transcription support for transcription models, including OpenAI gpt-realtime-whisper and xAI WebSocket STT.

  13. 4.0.7

    2 Jul 2026
    • Security

      Prevent prototype pollution when synchronously parsing provider JSON inputs and expose secureJsonParse from provider-utils.

    • Fix Google embedding batch size to respect the Gemini API limit of 100 requests per batch.

  14. 4.0.6

    2 Jul 2026
    • Add vertex.interactions() for the Gemini Interactions API on Vertex AI. Targets the location-scoped .../locations/{region}/interactions resource using the existing Vertex OAuth credentials, enabling multimodal-output models such as gemini-omni-flash-preview (video output) through Vertex. The GoogleInteractionsLanguageModel is now exported from @ai-sdk/google/internal for provider reuse.

  15. 4.0.5

    1 Jul 2026

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

  16. 4.0.4

    1 Jul 2026
    • Support Gemini Interactions video output. Parse video output blocks from the Google Interactions API into file parts (buffered and streaming), and surface the per-modality output token breakdown via providerMetadata.google.outputTokensByModality.

  17. 4.0.3

    30 Jun 2026
    • Feat (video): add first-class frameImages and inputReferences call options for video generation

  18. 4.0.1 – 4.0.22 releases with no change for you1 dependency update, 1 maintenance@ai-sdk/provider-utils 5.0.1Show each
  19. 4.0.0

    25 Jun 2026
    • Breaking

      provider/google: Remove useless GenerativeAI affix from types and classes for consistency

    • Breaking

      provider: Add support for reasoning-file type for files that are part of reasoning

    • Breaking

      Remove CommonJS exports from all packages. All packages are now ESM-only ("type": "module"). Consumers using require() must switch to ESM import syntax.

  20. 3.x
  21. 3.0.147

    17 Nov 2026
    • Limit the size of Google Vertex tool result file downloads with toolResultDownloads.maxBytes, which defaults to 7 MiB. This is lower than the previous 2 GiB default for these downloads; raise toolResultDownloads.maxBytes for larger files.

  22. 3.0.146

    12 Nov 2026
    • Add the gemini-4-hydrogen model ID and support Hydrogen's xhigh thinking level in Google Generate Content and Interactions provider options.

  23. 3.0.145

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

  24. 3.0.144

    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.

  25. 3.0.143

    7 Nov 2026
    • Bound Google JSON Schema conversion work, output size, and depth to prevent excessive resource use when inlining repeated local references. Input inspection and conversion each have a separate budget of 10,000 visited JSON values and a conservative 1,000,000-character serialized-size allowance, with a depth limit of 100. Schemas exceeding these limits now fail with a controlled error, including large schemas that were previously accepted. String-size accounting reserves six characters per UTF-16 code unit for JSON escaping.

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

    • Skip streamed tool-call array indexes that leave a gap so a small response can't build a huge sparse array

  26. 3.0.142

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

  27. 3.0.141

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

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

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

  28. 3.0.140

    29 Oct 2026
    • 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.

  29. 3.0.139

    26 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.

  30. 3.0.138

    23 Oct 2026
    • google: Convert type: [X, "null"] to a plain nullable node so items and format beside it stay valid for Gemini

  31. 3.0.137

    21 Oct 2026
    • Defer validation schema construction until first use to reduce provider import time.

  32. 3.0.136

    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.

  33. 3.0.133 – 3.0.1353 releases that only update dependencies@ai-sdk/provider-utils 4.0.61@ai-sdk/provider 3.0.19Show each
  34. 3.0.132

    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.

  35. 3.0.131

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

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

  36. 3.0.130

    30 Sep 2026
    • 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.

  37. 3.0.129

    28 Sep 2026

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

  38. 3.0.128

    27 Sep 2026
    • google: Forward supported GCS tool result URLs as function response file data on Vertex Gemini 3 and later. Restrict forwarding to supported image, PDF, and text MIME types while preserving HTTP(S) downloads for tool results on all Gemini generations.

  39. 3.0.127

    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.

  40. 3.0.126

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

  41. 3.0.125

    21 Sep 2026

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

  42. 3.0.124

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

  43. 3.0.123

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

  44. 3.0.122

    9 Sep 2026
    • Retry unclassified empty image results, preserve retry-attempt accounting, add provider-independent result retryability classification, preserve it through the AI Gateway, and mark Google and Google Vertex content-filtered results as terminal.

  45. 3.0.121

    3 Sep 2026
    • google: Add gemini-3.8-flash model

  46. 3.0.120

    31 Aug 2026
    • google: Support video response formats in Gemini Interactions

  47. 3.0.119

    30 Aug 2026
    • Preserve complete Google Generative Language usage metadata in raw usage results.

  48. 3.0.118

    27 Aug 2026
    • Omit unsupported frequency and presence penalties from Gemini 2.5 requests and return warnings instead.

  49. 3.0.116

    26 Aug 2026
    • google: Convert enum values to the Gemini schema format

    • Feat (provider/google, provider/google-vertex): Gemini 3.5 Transcribe support — unary transcription (gemini-3.5-transcribe) via generateContent with language detection, speaker diarization, word timestamps, custom vocabulary, and mode: 'VERBATIM' | 'SMART' transcription formatting

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.