@ai-sdk/vue@2.0.0 removes useChat, useAssistant and the message types it used to re-export, and useCompletion loses data and onResponse. Vue code that imports those names from @ai-sdk/vue, or reads data from useCompletion, is affected. The package now exports a Chat class built on ai@5.0.0 instead.

What changed

Before and after

No finding for this release has a deterministic rewrite. The one you are most likely to meet is useChat, which is an assisted change. The shape change is the point, so here are two short snippets.

Before, in a composable written for 1.x:

import { useChat, type UseChatHelpers, type UseChatOptions } from '@ai-sdk/vue';
export function useSupportChat(options: UseChatOptions): UseChatHelpers {
return useChat({ ...options, api: '/api/support' });
}

After, written for 2.0.0:

import { Chat } from '@ai-sdk/vue';
import { DefaultChatTransport, type UIMessage } from 'ai';
export function useSupportChat(messages: UIMessage[]): Chat<UIMessage> {
return new Chat({ messages, transport: new DefaultChatTransport({ api: '/api/support' }) });
}

The api, headers, body, credentials and fetch options move into DefaultChatTransport, and initialMessages becomes messages. The input is no longer managed, so keep it in a ref and pass it to sendMessage where handleSubmit was used. The other findings are handled the same way: the message type imports move to ai, and an onResponse that inspected the response becomes a fetch option that does the same inspection.

Migration guidance and its limits

Run emendant scan to list every site. All five findings have assisted fixes and none has a deterministic patch. emendant fix writes a patch only when you name a model provider, on the command line or in your Emendant configuration. Without one, each finding is reported with its guidance and nothing is changed.

Each patch is checked with your typecheck and your tests, so read the patch header to see what passed. Review every edit to a component that reads message text, because message.content is gone and a message built from a content string has to carry parts instead.

useAssistant has no replacement in @ai-sdk/vue@2.0.0. Moving off it means moving the route off the Assistants API, which changes the server as well as the component. Review the surrounding code; a patch may not be available. The data read on useCompletion is patched only where the read is unused. If the component needs the value, the server has to send it another way. An onResponse that did more than inspect the status or headers also needs your review.

No finding in this release is report only. A clean scan does not cover a name imported from another module, such as a local wrapper around the old hooks, and it does not show that the rest of your upgrade to ai@5.0.0 is complete.

What Emendant detects, fixes and verifies

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

ChangeSeverityDetectsFixVerified by
useChat was removed in favour of the Chat class
ai-sdk-vue-npm-2.0.0-use-chat-removed
error TS2305: Module '"@ai-sdk/vue"' has no exported member 'useChat'.
error TS2305: Module '"@ai-sdk/vue"' has no exported member 'UseChatHelpers'.
error TS2305: Module '"@ai-sdk/vue"' has no exported member 'UseChatOptions'.
Breaking
  • useChat imported from @ai-sdk/vue
  • UseChatHelpers imported from @ai-sdk/vue
  • UseChatOptions imported from @ai-sdk/vue
Patch, only when you name a model providerYour typecheck and tests
useAssistant was removed
ai-sdk-vue-npm-2.0.0-use-assistant-removed
error TS2305: Module '"@ai-sdk/vue"' has no exported member 'useAssistant'.
error TS2305: Module '"@ai-sdk/vue"' has no exported member 'UseAssistantHelpers'.
Breaking
  • useAssistant imported from @ai-sdk/vue
  • UseAssistantHelpers imported from @ai-sdk/vue
Patch, only when you name a model providerYour typecheck and tests
Message, CreateMessage and UIMessage are no longer exported
ai-sdk-vue-npm-2.0.0-message-types-removed
error TS2305: Module '"@ai-sdk/vue"' has no exported member 'CreateMessage'.
error TS2305: Module '"@ai-sdk/vue"' has no exported member 'Message'.
error TS2459: Module '"@ai-sdk/vue"' declares 'UIMessage' locally, but it is not exported.
Breaking
  • Message imported from @ai-sdk/vue
  • CreateMessage imported from @ai-sdk/vue
  • UIMessage imported from @ai-sdk/vue
Patch, only when you name a model providerYour typecheck and tests
useCompletion no longer returns data
ai-sdk-vue-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/vue returns
Patch, only when you name a model providerYour typecheck and tests
useCompletion's onResponse was removed
ai-sdk-vue-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'.
error TS7006: Parameter 'response' implicitly has an 'any' type.
Breaking
  • the onResponse key in the object passed to useCompletion imported from @ai-sdk/vue
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/vue 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/vue/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/vue release page is listed on one page.