@ai-sdk/google 4.0.98 declares responseModalities with a different type on GoogleLanguageModelOptions. The changelog describes the release as allowing AUDIO response modalities for Google language models. Code that supplies or reads responseModalities on a value of this type can stop type-checking. Code that only names the type may be unaffected.
What changed
- The options type members.
GoogleLanguageModelOptionsdeclaresresponseModalitieswith another type than 4.0.97 did. The feed marks this breaking, at medium confidence. The package also exports the same type asGoogleGenerativeAIProviderOptions, and that name has its own finding. - What the scan flags.
emendant scanreports each place that names either type imported from@ai-sdk/google, in any type position. A match means the code names the type. It does not meanresponseModalitiesreaches that code. A name imported from another module, such as a local compatibility file of your own, is not reported.
Before and after
There is no deterministic rewrite for this release, so there is no automatic before and after. The scan matches an import like this one:
import type { GoogleLanguageModelOptions } from '@ai-sdk/google';The import stays valid in 4.0.98. What needs attention is any object you build or read as this type that sets or inspects responseModalities. The record does not state the new member type, so compare that code against the 4.0.98 declarations. The same applies to GoogleGenerativeAIProviderOptions.
Migration guidance and its limits
Both findings carry an assisted fix, so emendant fix needs a named model provider, chosen on the command line or in your Emendant configuration. Without one, each finding is reported with its guidance and nothing is written. Emendant checks each patch with a typecheck and your tests, and withholds patches that fail. Read the patch header to see which checks passed.
Before applying a patch, open each flagged site and check whether the code supplies or reads responseModalities. If it only passes the type along or annotates a parameter, it may need no edit, and a patch may not be available. Where the code does use the member, the patch brings it into line with what the release declares and changes nothing else. Where the replacement cannot be determined from the release, review the surrounding code yourself.
No finding for this release is report only. A clean scan covers imports of GoogleLanguageModelOptions and GoogleGenerativeAIProviderOptions from @ai-sdk/google and nothing else. It does not cover the types reached through a re-export in your own module, or a copy of their shape that you declared yourself. It also says nothing about other changes in 4.0.98 that the feed does not carry.
What Emendant detects, fixes and verifies
2 changes in @ai-sdk/google 4.0.98. 0 automatic fixes, 2 fixes requiring a model provider you choose, 0 report only. Each patch states which checks passed. Understand patch evidence.
| Change | Severity | Detects | Fix | Verified by |
|---|---|---|---|---|
Changed the members of GoogleGenerativeAIProviderOptionsai-sdk-google-npm-4.0.98-google-generative-aiprovider-options-members-changed | Breaking medium confidence |
| Patch, only when you name a model provider | Your typecheck and tests |
Changed the members of GoogleLanguageModelOptionsai-sdk-google-npm-4.0.98-google-language-model-options-members-changed | Breaking medium confidence |
| Patch, only when you name a model provider | Your typecheck and tests |
emendant explain <change-id> prints any row's entry, guidance and sources at the terminal.
Coverage
Requires emendant@0.3.0 or later. Run emendant feed update to get the latest coverage.
Coverage details
- Snapshot
2026-10-16.1, sequence 46, signed 16 October 2026- Feed entry
feed/npm/@ai-sdk/google/4.0.98.json
emendant feed status shows the snapshot your machine holds.
Primary sources
- @ai-sdk/google@4.0.98npm registry, the published package
- @ai-sdk/google@4.0.97npm registry, the published package
Scan your repository
Find affected code without editing your files.
npx emendant scanThen npx emendant fix writes the patches the table says exist. The getting started guide covers the flags and the patch grades.
Related release pages
- Earlier @ai-sdk/google release: @ai-sdk/google 4.0.0: every model is a v4 provider type now
Every @ai-sdk/google release page is listed on one page.