@ai-sdk/google migration guide
Review @ai-sdk/google v4 model annotations, responseModalities and later settings changes, with supported release guides and scan limits.
These guides cover the AI SDK Google adapter, which is separate from @google/genai. An upgrade to adapter 4.0 changes the provider interfaces used by its models. Later listed 4.x releases change option and settings types, so check the releases between your installed version and target.
Choose your migration path
- Align model annotations with provider v4: Review v3 annotations on values produced by this adapter. Only change an annotation when that value uses the v4 interface; a custom v3 model implementation may still be correct.
- Review responseModalities: responseModalities changes type on GoogleLanguageModelOptions and GoogleGenerativeAIProviderOptions. Inspect the member where your code supplies or reads it.
- Review later provider and realtime settings: The release changes apiKey and headers members on the listed settings types. Use the release page to identify the interfaces your code actually uses.
Check your upgrade
Check your installed version in the manifest and lockfile, then read the release pages your upgrade crosses. Run npx emendant scan to find supported changes in TypeScript and JavaScript source without editing your files. Use npx emendant fix --dry-run to preview deterministic patches where available. The preview does not install dependencies, run your checks or call a model. Assisted patches need a named model provider and a fix run without --dry-run. After updating dependencies, run your typecheck and tests and review the patch grades in the fix guide.
Coverage and limits
Possible fixes for the listed findings require a named model provider. A type-reference finding can name code that forwards options without using the changed member, and unannotated option objects can escape detection. Review the finding and check your application after the dependency update.
The linked release pages list covered findings, possible fixes and tagged sources. A clean scan does not prove that every migration step is complete. Read the supported projects guide for the scan's scope.
@ai-sdk/google release pages
- @ai-sdk/google 4.0.109: apiKey and headers change type on provider settings and model configs
@ai-sdk/google 4.0.109, released 30 October 2026. 5 breaking, 0 deprecations. - @ai-sdk/google 4.0.98: responseModalities type changed
@ai-sdk/google 4.0.98, released 15 October 2026. 2 breaking, 0 deprecations. - @ai-sdk/google 4.0.0: every model is a v4 provider type now
@ai-sdk/google 4.0.0, released 25 June 2026. 1 breaking, 0 deprecations.
Releases without a page here may still be in the feed. Run emendant feed status to see what your snapshot holds.