@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
useChatis replaced byChat.UseChatHelpersandUseChatOptionsare gone with it. You readmessages,statusanderrorfrom the instance, andsendMessage,regenerateandstopare its methods.@ai-sdk/vue@4.0.0exportsuseChatagain, so if you are moving straight to 4.0.0 or later, check that release before choosing the class.useAssistantis removed.UseAssistantHelpersgoes too, and the package has nothing in their place.- The message types are no longer exported.
Message,CreateMessageandUIMessageare not re-exported. ImportUIMessageandCreateUIMessagefromaiinstead. AUIMessagehas nomessage.content; its text is held inmessage.parts. useCompletionreturns less and accepts less. It no longer returnsdata, and it no longer takesonResponse. It still acceptsfetch.
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.
| Change | Severity | Detects | Fix | Verified by |
|---|---|---|---|---|
useChat was removed in favour of the Chat classai-sdk-vue-npm-2.0.0-use-chat-removed | Breaking |
| Patch, only when you name a model provider | Your typecheck and tests |
useAssistant was removedai-sdk-vue-npm-2.0.0-use-assistant-removed | Breaking |
| Patch, only when you name a model provider | Your typecheck and tests |
Message, CreateMessage and UIMessage are no longer exportedai-sdk-vue-npm-2.0.0-message-types-removed | Breaking |
| Patch, only when you name a model provider | Your typecheck and tests |
useCompletion no longer returns dataai-sdk-vue-npm-2.0.0-use-completion-data-removed | Breaking |
| Patch, only when you name a model provider | Your typecheck and tests |
useCompletion's onResponse was removedai-sdk-vue-npm-2.0.0-use-completion-on-response-removed | Breaking |
| 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.
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
- package.jsonvercel/ai at @ai-sdk/vue@2.0.0
- Migration guidevercel/ai at ai@5.0.0
- @ai-sdk/vue@2.0.0npm registry, the published package
- @ai-sdk/vue@1.2.12npm registry, the published package
- ai@5.0.0npm registry, the published package
- @ai-sdk/ui-utils@1.2.11npm 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
Every @ai-sdk/vue release page is listed on one page.