@ai-sdk/google
4.0.122 · 17 Nov 2026Apache-2.014.6M / weekRepositoryHomepagenpmAtom feed
Upgrading @ai-sdk/google From 1.2.10 to 4.0.122
385 releases in betweennotes for 383
Reading releases, release notes and advisories…
- 11+
- changes to make
- 0
- advisories fixed
- 120+
- new
- 169+
- fixes
Counted from 383 of 385 release notes. Advisories are counted from the advisory database, in full.
Before you upgrade
Tick each one off as you go- Breaking4.0.0
- Breaking4.0.0
- Breaking4.0.0
- Breaking4.0.0
- Breaking4.0.0
- Breaking4.0.0
- Breaking4.0.0
- Breaking4.0.0
- Breaking3.0.0
- Breaking2.0.0
Security
- 4.0.7
Prevent prototype pollution when synchronously parsing provider JSON inputs and expose
secureJsonParsefrom provider-utils. - 4.0.0
google: Prevent prototype pollution when streaming tool args
Release by release
- Fixed
google: Reject structured output schemas in batch requests because inline Google batch requests ignore
responseJsonSchema - Fixed
provider/google: Redact MCP server credentials in telemetry
- Fixed
google: Include
promptFeedback.blockReasonMessagein provider metadata
- Fixed
- Fixed
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.
- Fixed
Fix Google Interactions ignoring top-level
reasoningin generation and streaming calls. Map reasoning to model-supported thinking levels, including Hydrogen'sxhigh, preserve explicitthinkingLeveloverrides and API defaults, and warn when reasoning is unsupported.
- Fixed
- New
Add experimental extraction models backed by structured language model output
- New
- New
Add the
gemini-4-hydrogenmodel ID and support Hydrogen'sxhighthinking level in Google Generate Content and Interactions provider options. Map portablereasoning: 'xhigh'toxhighonly for Hydrogen models. - Fixed
Forward the provider's configured fetch transport when downloading file inputs. Add a
fetchoption tocreateDownloadso core downloads can also useguarded-fetchfor opt-in DNS validation on Node.js. The function returned bycreateDownloadcan now also be passed asexperimental_downloadtogenerateTextandstreamText, andexperimental_downloadnow 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.
- New
- Fixed
Use the native gemini decisions api for google decision models
- Fixed
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.
- Fixed
- New
Add support for the
gemini-4-carbonmodel with the same capabilities asgemini-4-argon.
- New
- Fixed
Preserve the served service tier from the
x-gemini-service-tierresponse header when usage metadata omits it, for generated and streamed responses. - Fixed
Apply contiguous array-index validation to dotted numeric paths in streamed tool arguments, while preserving numeric object keys and valid contiguous array updates.
- Fixed
- New
Add
resolveProviderOptionsto parse provider options that a model accepts under severalproviderOptionskeys, 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. - Fixed
Pass
providerOptions.google.labelsthrough to Google and Vertex AI Interactions requests, including streaming, so callers can attach request metadata such assafety_identifier. - Fixed
Omit Google provider-defined tools, including File Search and Vertex RAG Store, when
toolChoiceisnoneso 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. - Fixed
Skip streamed tool-call array indexes that leave a gap so a small response can't build a huge sparse array
- New
230 internal lines (docs, tests, tooling) left out.
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.