@ai-sdk/google
4.0.122 · 17 Nov 2026Apache-2.014.6M / weekRepositoryHomepagenpmAtom feed
2.0.111 is the newest release of 2.x.
In short
1 breaking1 removed14 new14 fixed5 internal
- Breaking
AI SDK 5
- Removed
Removes (unsupported)
additionalPropertiesfrom the Schema sent in the request payloads to Google APIs
Release note
Major Changes
- Breaking
AI SDK 5
Patch Changes
Add code execution provider defined tool
Feat (provider/google): add new gemini models
Expose raw usageMetadata returned from Google Generative AI in providerMetadata
Added Image Models to the Google Provider for Imagen 3 Support
Update supportedUrls to only support native URL
providers/google: Add taskType support for Text Embedding Models
Feat (providers/google): add thinking config to provider options
Add raw chunk support
Chore (providers): remove model shorthand deprecation warnings
embed() now uses the single embeddings endpoint
No code updates are needed.This is to make sure that users are not ratelimited when using the batch endpoint, since many models have different limits for batch and single embeddings.
Eg: Google has a limit of 150 RPM for batch requests, and 1500 RPM for single requests.
Before, AI SDK would always use the batch endpoint, even for embed() calls, which led to ratelimits.
This does not have any breaking functionality and is fully tested :)
if (values.length > 1) {
const batchResult = await this.doEmbedBatch({
values,
options,
});
return batchResult;
}Fix (provider/google): allow "OFF" for Google HarmBlockThreshold
embedding-model-v2: Add response body field
Support tool schemas that allow additional properties (e.g
z.record(z.string()))packages: Export node10 compatible types
Omit system message for gemma models
Remove non-functional models
providers/google: Accept nullish in safetyRatings
Add Gemini 2.5 Flash Lite GA
Add provider option schemas for vertex imagegen and google genai
Fix (provider/google): prevent error when thinking signature is used
Feat (provider/google): Change to provider defined tools
Change the google search tool to be a provider defined tool
Added new URL context tool as a provider defined tool
providers/google: Add support for Gemini 2.5 Pro and Gemini 2.5 Flash (now stable)
google: Automatically handle system instructions for Gemma models
Using Zod 4 for internal stuff
- Removed
Removes (unsupported)
additionalPropertiesfrom the Schema sent in the request payloads to Google APIs Add gemini-embedding-001 model, add embedding provider options type export
google: Grounding streaming sources
Improve Zod compatibility
tool-calling: Don't require the user to have to pass parameters
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.