@ai-sdk/svelte 3.0.0 rebuilds Chat on AbstractChat from ai 5.0.0, and several names, options, methods and properties that 2.1.12 exposed are gone. A module or component needs an edit if it imports Message, CreateMessage or ChatOptions, calls append, reload or addToolResult on a Chat, or reads data from a Chat or Completion. Messages now carry parts where they used to carry a content string.

What changed

Before and after

The change you are most likely to meet is addToolResult inside an onToolCall handler:

chat.addToolResult({ toolCallId: toolCall.toolCallId, result: 'London' });

The patch renames the key and names the tool whose call is being answered:

chat.addToolResult({ tool: toolCall.toolName, toolCallId: toolCall.toolCallId, output: 'London' });

No change in this release has a deterministic patch. The other rewrites follow the same direct shape: reload becomes regenerate with headers and body kept, initialMessages becomes messages, and new Chat() becomes new Chat({}).

Migration guidance and its limits

Run emendant scan to list the affected files, then emendant fix. All six findings have assisted patches, so emendant fix writes one only when you name a model provider, on the command line or in your Emendant configuration. Each patch is checked with your typecheck and with the tests it affects. Nothing in this release is report only.

Some patches change more than the file they edit. If your server read the data request option, it has to receive that value in body instead. Replacing maxSteps means the route must stop on its own, for example with stopWhen in streamText. Moving off data means changing the route as well as the component, and a Completion has no replacement to move to. A patch may not be available where the surrounding code decides the outcome, such as an addToolResult call where the tool name cannot be read from the code around it. Review those by hand.

A clean scan covers imports of the removed names from @ai-sdk/svelte, reads of append, reload and data on instances built from it, and addToolResult calls whose argument has no output. It does not read markup, so a chat.reload() or chat.data inside a template is not reported. The managed input and handleSubmit are not among the findings either, so check any code that still uses them.

What Emendant detects, fixes and verifies

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

ChangeSeverityDetectsFixVerified by
Message and CreateMessage are no longer exported
ai-sdk-svelte-npm-3.0.0-message-types-removed
error TS2724: '"@ai-sdk/svelte"' has no exported member named 'CreateMessage'. Did you mean 'CreateUIMessage'?
error TS2724: '"@ai-sdk/svelte"' has no exported member named 'Message'. Did you mean 'UIMessage'?
Breaking
  • Message imported from @ai-sdk/svelte
  • CreateMessage imported from @ai-sdk/svelte
Patch, only when you name a model providerYour typecheck and tests
ChatOptions was removed, and Chat takes ai's ChatInit
ai-sdk-svelte-npm-3.0.0-chat-options-removed
error TS2305: Module '"@ai-sdk/svelte"' has no exported member 'ChatOptions'.
Breaking
  • ChatOptions imported from @ai-sdk/svelte
Patch, only when you name a model providerYour typecheck and tests
Chat's append was removed in favour of sendMessage
ai-sdk-svelte-npm-3.0.0-chat-append-removed
error TS2339: Property 'append' does not exist on type 'Chat<UIMessage<unknown, UIDataTypes, UITools>>'.
Breaking
  • .append read on an instance constructed from @ai-sdk/svelte
Patch, only when you name a model providerYour typecheck and tests
Chat's reload was removed in favour of regenerate
ai-sdk-svelte-npm-3.0.0-chat-reload-removed
error TS2339: Property 'reload' does not exist on type 'Chat<UIMessage<unknown, UIDataTypes, UITools>>'.
Breaking
  • .reload read on an instance constructed from @ai-sdk/svelte
Patch, only when you name a model providerYour typecheck and tests
Chat and Completion no longer have data
ai-sdk-svelte-npm-3.0.0-data-removed
error TS2339: Property 'data' does not exist on type 'Chat<UIMessage<unknown, UIDataTypes, UITools>>'.
error TS2339: Property 'data' does not exist on type 'Completion'.
Breaking
  • .data read on an instance constructed from @ai-sdk/svelte
Patch, only when you name a model providerYour typecheck and tests
Chat's addToolResult takes output and tool where it took result
ai-sdk-svelte-npm-3.0.0-add-tool-result-output-renamed
error TS2353: Object literal may only specify known properties, and 'result' does not exist in type '{ tool: string; toolCallId: string; output: unknown; }'.
Breaking
  • a output key absent from the object passed to .addToolResult() on an instance constructed from @ai-sdk/svelte
Patch, only when you name a model providerYour typecheck and tests
Chat no longer manages an input, and handleSubmit was removed
ai-sdk-svelte-npm-3.0.0-chat-managed-input-removed
error TS2339: Property 'input' does not exist on type 'Chat<UIMessage<unknown, UIDataTypes, UITools>>'.
error TS2339: Property 'handleSubmit' does not exist on type 'Chat<UIMessage<unknown, UIDataTypes, UITools>>'.
Breaking
  • .input read on an instance of Chat constructed from @ai-sdk/svelte
  • .handleSubmit read on an instance of Chat constructed from @ai-sdk/svelte
Patch, only when you name a model providerYour typecheck and tests
new Chat takes messages where it took initialMessages
ai-sdk-svelte-npm-3.0.0-chat-initial-messages-renamed
error TS2353: Object literal may only specify known properties, and 'initialMessages' does not exist in type 'ChatInit<UIMessage<unknown, UIDataTypes, UITools>>'.
Breaking
  • the initialMessages key in the object passed to new Chat imported from @ai-sdk/svelte
Patch, only when you name a model providerYour typecheck and tests
new Chat no longer takes api, headers, body, credentials or fetch
ai-sdk-svelte-npm-3.0.0-chat-request-options-moved-to-transport
error TS2353: Object literal may only specify known properties, and 'api' does not exist in type 'ChatInit<UIMessage<unknown, UIDataTypes, UITools>>'.
Breaking
  • the api key in the object passed to new Chat imported from @ai-sdk/svelte
  • the headers key in the object passed to new Chat imported from @ai-sdk/svelte
  • the body key in the object passed to new Chat imported from @ai-sdk/svelte
  • the credentials key in the object passed to new Chat imported from @ai-sdk/svelte
  • the fetch key in the object passed to new Chat imported from @ai-sdk/svelte
Patch, only when you name a model providerYour typecheck and tests
new Chat no longer takes maxSteps, initialInput, onResponse, keepLastMessageOnError or sendExtraMessageFields
ai-sdk-svelte-npm-3.0.0-chat-options-dropped
Breaking
  • the maxSteps key in the object passed to new Chat imported from @ai-sdk/svelte
  • the initialInput key in the object passed to new Chat imported from @ai-sdk/svelte
  • the onResponse key in the object passed to new Chat imported from @ai-sdk/svelte
  • the keepLastMessageOnError key in the object passed to new Chat imported from @ai-sdk/svelte
  • the sendExtraMessageFields key in the object passed to new Chat imported from @ai-sdk/svelte
Patch, only when you name a model providerYour typecheck and tests
new Completion no longer takes onResponse
ai-sdk-svelte-npm-3.0.0-completion-on-response-removed
error TS2353: Object literal may only specify known properties, and 'onResponse' does not exist in type 'Readonly<UseCompletionOptions>'.
Breaking
  • the onResponse key in the object passed to new Completion imported from @ai-sdk/svelte
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/svelte 2.1.12 was compiled against 3.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.10.0 or later. Run emendant feed update to get the latest coverage.

Coverage details
Snapshot
2026-10-22.4, sequence 58, signed 22 October 2026
Feed entry
feed/npm/@ai-sdk/svelte/3.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/svelte release page is listed on one page.