@ai-sdk/react 2.0.0 removes useAssistant, replaces Message and CreateMessage with UIMessage and CreateUIMessage, and reshapes useChat and useCompletion. A component that imports these from @ai-sdk/react, or reads a removed member off what useChat returns, stops type-checking. The AI SDK 5 migration guide is the source for the replacements below.

What changed

Before and after

The one deterministic patch renames a returned member:

// before
const resume = () => chat.experimental_resume();
// after
const resume = () => chat.resumeStream();

The other rewrites are assisted. append is one where the shape change is the point:

// before
const ask = (text: string) => chat.append({ role: 'user', content: text });
// after
const ask = (text: string) => chat.sendMessage({ text });

The remaining assisted patches cover input state, transport options, messages, status and the removed options.

Migration guidance and its limits

Run emendant scan to list the affected sites, then emendant fix. The experimental_resume rename is a deterministic patch and needs no model provider. The other thirteen findings have assisted patches, and emendant fix writes them only when you name a model provider. Each patch is checked with your typecheck and your tests.

Some edits reach past the component. Moving off data needs the server route to write data parts, and moving off useAssistant means moving the route off the Assistants API. That removal has no direct replacement; review the surrounding code. A patch may not be available for these, or for an onResponse that did more than inspect the status or headers of the response.

Stored messages need attention too. Messages saved in the earlier shape must be converted to parts before they are passed as messages. Code that awaited append or reload for the response must read the last message from messages instead.

No finding in this release is report only. A clean scan covers imports from @ai-sdk/react and the useChat and useCompletion uses described above. It does not check your server routes, your stored messages or your other AI SDK packages.

What Emendant detects, fixes and verifies

14 changes in @ai-sdk/react 2.0.0. 1 automatic fixes, 13 fixes requiring a model provider you choose, 0 report only. Each patch states which checks passed. Understand patch evidence.

ChangeSeverityDetectsFixVerified by
useAssistant was removed
ai-sdk-react-npm-2.0.0-use-assistant-removed
error TS2305: Module '"@ai-sdk/react"' has no exported member 'useAssistant'.
error TS2305: Module '"@ai-sdk/react"' has no exported member 'UseAssistantHelpers'.
Breaking
  • useAssistant imported from @ai-sdk/react
  • UseAssistantHelpers imported from @ai-sdk/react
Patch, only when you name a model providerYour typecheck and tests
Message and CreateMessage are no longer exported, in favour of UIMessage and CreateUIMessage
ai-sdk-react-npm-2.0.0-message-types-removed
error TS2724: '"@ai-sdk/react"' has no exported member named 'CreateMessage'. Did you mean 'CreateUIMessage'?
error TS2724: '"@ai-sdk/react"' has no exported member named 'Message'. Did you mean 'UIMessage'?
Breaking
  • Message imported from @ai-sdk/react
  • CreateMessage imported from @ai-sdk/react
Patch, only when you name a model providerYour typecheck and tests
useChat no longer manages the input
ai-sdk-react-npm-2.0.0-use-chat-input-removed
error TS2339: Property 'handleSubmit' does not exist on type 'UseChatHelpers<UIMessage<unknown, UIDataTypes, UITools>>'.
error TS2339: Property 'input' does not exist on type 'UseChatHelpers<UIMessage<unknown, UIDataTypes, UITools>>'.
error TS2339: Property 'handleInputChange' does not exist on type 'UseChatHelpers<UIMessage<unknown, UIDataTypes, UITools>>'.
error TS2339: Property 'setInput' does not exist on type 'UseChatHelpers<UIMessage<unknown, UIDataTypes, UITools>>'.
Breaking
  • .input read on what useChat imported from @ai-sdk/react returns
  • .setInput read on what useChat imported from @ai-sdk/react returns
  • .handleInputChange read on what useChat imported from @ai-sdk/react returns
  • .handleSubmit read on what useChat imported from @ai-sdk/react returns
  • the initialInput key in the object passed to useChat imported from @ai-sdk/react
Patch, only when you name a model providerYour typecheck and tests
useChat's append was removed in favour of sendMessage
ai-sdk-react-npm-2.0.0-use-chat-append-removed
error TS2339: Property 'append' does not exist on type 'UseChatHelpers<UIMessage<unknown, UIDataTypes, UITools>>'.
Breaking
  • .append read on what useChat imported from @ai-sdk/react returns
Patch, only when you name a model providerYour typecheck and tests
useChat's reload was removed in favour of regenerate
ai-sdk-react-npm-2.0.0-use-chat-reload-removed
error TS2339: Property 'reload' does not exist on type 'UseChatHelpers<UIMessage<unknown, UIDataTypes, UITools>>'.
Breaking
  • .reload read on what useChat imported from @ai-sdk/react returns
Patch, only when you name a model providerYour typecheck and tests
useChat's experimental_resume is now resumeStream
ai-sdk-react-npm-2.0.0-use-chat-experimental-resume-renamed
error TS2339: Property 'experimental_resume' does not exist on type 'UseChatHelpers<UIMessage<unknown, UIDataTypes, UITools>>'.
Breaking
  • .experimental_resume read on what useChat imported from @ai-sdk/react returns
Patch, written by the rename-property transformYour typecheck and tests
useChat's isLoading was removed in favour of status
ai-sdk-react-npm-2.0.0-use-chat-is-loading-removed
error TS2339: Property 'isLoading' does not exist on type 'UseChatHelpers<UIMessage<unknown, UIDataTypes, UITools>>'.
Breaking
  • .isLoading read on what useChat imported from @ai-sdk/react returns
Patch, only when you name a model providerYour typecheck and tests
useChat no longer returns data, setData or metadata
ai-sdk-react-npm-2.0.0-use-chat-data-removed
error TS2339: Property 'data' does not exist on type 'UseChatHelpers<UIMessage<unknown, UIDataTypes, UITools>>'.
error TS2339: Property 'metadata' does not exist on type 'UseChatHelpers<UIMessage<unknown, UIDataTypes, UITools>>'.
error TS2339: Property 'setData' does not exist on type 'UseChatHelpers<UIMessage<unknown, UIDataTypes, UITools>>'.
Breaking
  • .data read on what useChat imported from @ai-sdk/react returns
  • .setData read on what useChat imported from @ai-sdk/react returns
  • .metadata read on what useChat imported from @ai-sdk/react returns
Patch, only when you name a model providerYour typecheck and tests
useChat's request options moved to a transport
ai-sdk-react-npm-2.0.0-use-chat-request-options-moved-to-transport
error TS2353: Object literal may only specify known properties, and 'api' does not exist in type 'UseChatOptions<UIMessage<unknown, UIDataTypes, UITools>>'.
error TS7031: Binding element 'messages' implicitly has an 'any' type.
Breaking
  • the api key in the object passed to useChat imported from @ai-sdk/react
  • the credentials key in the object passed to useChat imported from @ai-sdk/react
  • the headers key in the object passed to useChat imported from @ai-sdk/react
  • the body key in the object passed to useChat imported from @ai-sdk/react
  • the fetch key in the object passed to useChat imported from @ai-sdk/react
  • the streamProtocol key in the object passed to useChat imported from @ai-sdk/react
  • the experimental_prepareRequestBody key in the object passed to useChat imported from @ai-sdk/react
Patch, only when you name a model providerYour typecheck and tests
useChat's initialMessages is now messages
ai-sdk-react-npm-2.0.0-use-chat-initial-messages-renamed
Breaking
  • the initialMessages key in the object passed to useChat imported from @ai-sdk/react
Patch, only when you name a model providerYour typecheck and tests
useChat's maxSteps was removed
ai-sdk-react-npm-2.0.0-use-chat-max-steps-removed
Breaking
  • the maxSteps key in the object passed to useChat imported from @ai-sdk/react
Patch, only when you name a model providerYour typecheck and tests
useChat's keepLastMessageOnError, sendExtraMessageFields, key and onResponse were removed
ai-sdk-react-npm-2.0.0-use-chat-options-removed
error TS7006: Parameter 'response' implicitly has an 'any' type.
Breaking
  • the keepLastMessageOnError key in the object passed to useChat imported from @ai-sdk/react
  • the sendExtraMessageFields key in the object passed to useChat imported from @ai-sdk/react
  • the key key in the object passed to useChat imported from @ai-sdk/react
  • the onResponse key in the object passed to useChat imported from @ai-sdk/react
Patch, only when you name a model providerYour typecheck and tests
useCompletion no longer returns data
ai-sdk-react-npm-2.0.0-use-completion-data-removed
error TS2339: Property 'data' does not exist on type 'UseCompletionHelpers'.
Breaking
  • .data read on what useCompletion imported from @ai-sdk/react returns
Patch, only when you name a model providerYour typecheck and tests
useCompletion's onResponse was removed
ai-sdk-react-npm-2.0.0-use-completion-on-response-removed
error TS2353: Object literal may only specify known properties, and 'onResponse' does not exist in type 'UseCompletionOptions & { experimental_throttle?: number | undefined; }'.
error TS7006: Parameter 'response' implicitly has an 'any' type.
Breaking
  • the onResponse key in the object passed to useCompletion imported from @ai-sdk/react
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.

The error TS lines are what TypeScript 5.9.3 printed when code that compiled against @ai-sdk/react 1.2.12 was compiled against 2.0.0. A row without one is a change the compiler does not report, such as a deprecation or a change in behaviour.

Coverage

Requires emendant@0.3.0 or later. Run emendant feed update to get the latest coverage.

Coverage details
Snapshot
2026-10-21.3, sequence 53, signed 21 October 2026
Feed entry
feed/npm/@ai-sdk/react/2.0.0.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/react release page is listed on one page.