@ai-sdk/react 4.0.167 declares the members of Experimental_UseRealtimeOptions differently, and api is now declared with another type. You are affected if your code names Experimental_UseRealtimeOptions imported from @ai-sdk/react. The type is still exported under the same name.
What changed
- Changed members on
Experimental_UseRealtimeOptions. The 4.0.167 declarations differ from 4.0.166 in howapiis typed. Code that suppliesapiin an options object, or reads it from a value of this type, may no longer type-check. - Where the change comes from. The 4.0.167 changelog lists support for provider-owned realtime transports, with an optional
createTransportinterface and aproviderconnection capability. Emendant carries one change for this release, the member change above, and reports nothing about the other items in the changelog. - What the scan matches. The scan flags any file that names the type in a type position, whether in an annotation, a generic argument or a function signature. A file that only names the type may not touch
apiat all, so a finding is a prompt to check, not proof of breakage.
Before and after
The scan matches a type import from @ai-sdk/react and the places the type is named:
import type { Experimental_UseRealtimeOptions } from '@ai-sdk/react';There is no fixed text rewrite for this change, so no after snippet can be given. The patch is assisted. Where your code supplies or reads api, it is brought into line with what the 4.0.167 declarations say for that member, and nothing else in the file is touched. The sources for this release do not spell out the new type of api, so the replacement comes from reading the declarations in your installed 4.0.167 package. This release has no other rewrites.
Migration guidance and its limits
Run emendant scan to list the files that name Experimental_UseRealtimeOptions from @ai-sdk/react, then run emendant fix. The finding has an assisted patch, so emendant fix writes it only when you name a model provider. Without one, the finding is reported and nothing is changed. This release has no deterministic patch, and no finding in it is report only.
Each patch is checked with your typecheck and your tests. Read the patch header to see which checks passed. Code that only names the type, for example to annotate a variable it never populates, may need no edit. Where the release does not make clear what replaces a member, review the surrounding code yourself. A patch may not be available there.
Compile the project against 4.0.167 after patching. Any place that builds an options object and passes it on is worth reading, since the type error may surface at the call site rather than where the type is named.
A clean scan covers imports of Experimental_UseRealtimeOptions from @ai-sdk/react. The same name imported from another module, such as a local compatibility file, is not reported. A clean scan also says nothing about the other changes in the 4.0.167 changelog, because this page covers the one change the feed carries.
What Emendant detects, fixes and verifies
1 change in @ai-sdk/react 4.0.167. 0 automatic fixes, 1 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 Experimental_UseRealtimeOptionsai-sdk-react-npm-4.0.167-experimental-use-realtime-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-11-05.3, sequence 69, signed 5 November 2026- Feed entry
feed/npm/@ai-sdk/react/4.0.167.json
emendant feed status shows the snapshot your machine holds.
Primary sources
- @ai-sdk/react@4.0.167npm registry, the published package
- @ai-sdk/react@4.0.166npm 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/react release: @ai-sdk/react@4.0.162: experimental_MCPAppRenderer deprecated
Every @ai-sdk/react release page is listed on one page.