@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

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.

ChangeSeverityDetectsFixVerified by
Changed the members of GoogleGenerativeAIProviderOptions
ai-sdk-google-npm-4.0.98-google-generative-aiprovider-options-members-changed
Breaking
medium confidence
  • GoogleGenerativeAIProviderOptions imported from @ai-sdk/google, named in any type position
Patch, only when you name a model providerYour typecheck and tests
Changed the members of GoogleLanguageModelOptions
ai-sdk-google-npm-4.0.98-google-language-model-options-members-changed
Breaking
medium confidence
  • GoogleLanguageModelOptions imported from @ai-sdk/google, named in any type position
Patch, only when you name a model providerYour 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

Scan your repository

Find affected code without editing your files.

npx emendant scan

Then npx emendant fix writes the patches the table says exist. The getting started guide covers the flags and the patch grades.

Every @ai-sdk/google release page is listed on one page.