AI SDK 6 removes the message names v5 only deprecated, and lands four more renames beside them. Two of those four change what already-compiling code returns rather than what it imports. Upgrade from 5.x and the typecheck catches the removals; the two behaviour changes need a read of the diff, because nothing fails to compile.

What changed

Before and after

The rename that needs nothing but the name, from fixtures/ai-v6/positive/renamed-exports.ts:

import { Experimental_Agent, getToolName, isToolUIPart, type ToolCallOptions } from 'ai';
export const agent = new Experimental_Agent({ model: null as never });
export function describe(part: never, options: ToolCallOptions): string {
return isToolUIPart(part) ? `${getToolName(part)} ${String(options)}` : 'none';
}

After npx emendant fix:

import { ToolLoopAgent, getStaticToolName, isStaticToolUIPart, type ToolExecutionOptions } from 'ai';
export const agent = new ToolLoopAgent({ model: null as never });
export function describe(part: never, options: ToolExecutionOptions): string {
return isStaticToolUIPart(part) ? `${getStaticToolName(part)} ${String(options)}` : 'none';
}

CoreMessage and convertToCoreMessages rewrite the same way, one name for one name, except that a direct use of the awaited result now needs an await the old call did not. The four role-specific types and their five schemas rewrite too, but as nine renames in one import they go to a named model provider rather than a transform. The MCP client is a specifier move rather than a rename: the names keep their shape, so the edit is the import source changing and the new package landing on the manifest before anything compiles again.

Migration guidance and its limits

Apply the six deterministic patches: the CoreMessage rename, the convertToCoreMessages rename, and the four tool and agent renames. They are safe as offered, but two carry a check the rewrite itself does not make. convertToModelMessages is asynchronous, so a call whose result was used directly needs an await added by hand. Experimental_Agent calls that passed system fail to typecheck as ToolLoopAgent, which is where a stale default gets caught rather than silently kept.

The two assisted changes need a model provider named on the command line or in emendant.json. The nine role-message renames are small and mechanical, one name for one name. The MCP move needs a manifest edit Emendant does not make for you, alongside the import rewrite.

isToolUIPart and getToolName are flagged wherever they are called, but nothing here says whether keeping the call is a mistake. If the intent was always static tool parts only, rename it to the static form. If dynamic tool parts should already have counted, the call was already answering the wrong question in v5’s names, and that is a decision only a reader of the surrounding code can make.

What Emendant detects, fixes and verifies

8 changes in ai 6.0.0. 6 patched by a transform, 2 patched only with a model provider you name, 0 report only. Every patch is proved in a copy of your repository before it is offered, and its header names the checks that passed. This table is generated from the feed entry, so it cannot claim more than the entry does.

ChangeSeverityDetectsFixVerified by
CoreMessage was removed
ai-npm-6.0.0-coremessage-removed
Breaking
deprecated in 5.0.0
  • CoreMessage imported from ai
Patch, written by the replace-import-specifier transformYour typecheck and tests
The role specific CoreMessage types were removed
ai-npm-6.0.0-coremessage-role-aliases-removed
Breaking
deprecated in 5.0.0
  • CoreSystemMessage imported from ai
  • CoreUserMessage imported from ai
  • CoreAssistantMessage imported from ai
  • CoreToolMessage imported from ai
  • coreMessageSchema imported from ai
  • coreSystemMessageSchema imported from ai
  • coreUserMessageSchema imported from ai
  • coreAssistantMessageSchema imported from ai
  • coreToolMessageSchema imported from ai
Patch, only when you name a model providerYour typecheck and tests
convertToCoreMessages was removed
ai-npm-6.0.0-converttocoremessages-removed
Breaking
deprecated in 5.0.0
  • convertToCoreMessages imported from ai
Patch, written by the replace-import-specifier transformYour typecheck and tests
Experimental_Agent became ToolLoopAgent
ai-npm-6.0.0-experimental-agent-renamed
Deprecation
  • Experimental_Agent imported from ai
Patch, written by the replace-import-specifier transformYour typecheck and tests
ToolCallOptions became ToolExecutionOptions
ai-npm-6.0.0-toolcalloptions-renamed
Deprecation
removed in 7.0.0
  • ToolCallOptions imported from ai
Patch, written by the replace-import-specifier transformYour typecheck and tests
isToolUIPart now accepts dynamic tool parts too
ai-npm-6.0.0-istooluipart-meaning-changed
Behaviour
  • isToolUIPart imported from ai
Patch, written by the replace-import-specifier transformYour typecheck and tests
getToolName now reads dynamic tool parts too
ai-npm-6.0.0-gettoolname-meaning-changed
Behaviour
  • getToolName imported from ai
Patch, written by the replace-import-specifier transformYour typecheck and tests
The experimental MCP client left the ai package
ai-npm-6.0.0-mcp-client-moved
Breaking
  • experimental_createMCPClient imported from ai
  • calls to experimental_createMCPClient imported from ai
  • experimental_MCPClient imported from ai
  • experimental_MCPClientConfig imported from ai
  • MCPTransport imported from ai
  • MCPClientError imported from ai
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.

Coverage

Snapshot
2026-08-28.1, sequence 11, signed 28 August 2026
Minimum CLI
emendant@0.1.0
Feed entry
feed/npm/ai/6.0.0.json

emendant feed status shows the snapshot your machine holds, and emendant feed update fetches the latest.

Primary sources

Every claim above was checked against these, each pinned to the release rather than to a default branch.

Scan your repository

Runs locally, reads your lockfile and source, sends nothing anywhere.

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.