@ai-sdk/react migration guide
Migrate @ai-sdk/react useChat to 2.0: review input state, sendMessage, regenerate, transport options and supported fixes.
The @ai-sdk/react 2.0 migration changes both useChat state and the way requests are sent. Check components that rely on managed input, append, reload or the old request options. Updating the package version alone does not adapt the component or its server route.
Choose your migration path
- Migrate React bindings to 2.0: useChat stops managing input, append becomes sendMessage and reload becomes regenerate. Request options move to a transport, useAssistant is removed, and the message types change. The experimental_resume rename has a deterministic patch; the other listed fixes need a named model provider.
- Review the later renderer deprecation: The later release page covers experimental_MCPAppRenderer. Read its scope separately; a page for this release does not imply coverage of every change between React bindings 2.0 and 4.0.
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
Review component state, message rendering and server behavior after applying a possible patch. Emendant reports only the supported patterns in the release records. A clean scan does not prove that an entire React chat migration is complete or that all intermediate releases are covered.
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/react release pages
- @ai-sdk/react@4.0.167: Experimental_UseRealtimeOptions members changed
@ai-sdk/react 4.0.167, released 5 November 2026. 1 breaking, 0 deprecations. - @ai-sdk/react@4.0.162: experimental_MCPAppRenderer deprecated
@ai-sdk/react 4.0.162, released 30 October 2026. 0 breaking, 1 deprecation. - @ai-sdk/react 2.0.0: useChat migration
@ai-sdk/react 2.0.0, released 31 July 2025. 14 breaking, 0 deprecations.
Releases without a page here may still be in the feed. Run emendant feed status to see what your snapshot holds.