npm / @assistant-ui/react-ai-sdk
@assistant-ui/react-ai-sdk
What changed in @assistant-ui/react-ai-sdk 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-13.
7 breaking1 security1 deprecations21 new APIs and options6 behavior and defaults32 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@assistant-ui/react-ai-sdk 168 changes
Breaking changes 7
ai (7.0.101 or newer) is now a peer dependency, so the adapter shares the app's ai and avoids duplicate assistant-cloud copies with incompatible AssistantCloud types.
The ^1.4 line targets ai@^7; v6 users should pin 1.3.40 and v5 users should pin 1.1.21.
The package upgrades to AI SDK v7, including ai@^7, @ai-sdk/react@^4, and @ai-sdk/mcp@^2; the previous release remains on v6.
Use AISDKToolkit with its async tools method instead of generativeTools; it supports MCP server connections and replaces generativeTools for every toolkit.
The package root now bundles on edge, Cloudflare Workers, Deno, and browsers; stdio MCP throws a runtime error where subprocesses cannot be spawned, while Node, Bun, and Deno retain the real transport.
useAISDKRuntimenow throws if the supplied ThreadHistoryAdapter omitswithFormat, rather than silently dropping history load, append, and update calls.The aui-source export condition was removed from package.json exports, changing how consumers resolve package exports.
Security 1
Resumable session storage access is now guarded.
Deprecations 1
Deprecated in favor of AISDKToolkit; it continues to work but will be removed in a future version.
New APIs and options 21
Enables message queuing in AI SDK runtimes; steered messages run first after the current request and its client tools finish, while failed queued sends remain available for retry.
AISDKThreads({ cloud }) hosts assistant-cloud thread lists via RemoteThreadList and remounts each thread like useChatRuntime.
The resumable stream ID storage key can be derived lazily from a getter, allowing apps to scope it per thread.
Exposes the AI SDK chat helper through a runtime extras accessor hook.
Exposes the AI SDK error through a runtime extras accessor hook.
adapters.suggestion generates follow-up suggestions after each run.
Chat runtime resume errors are now exposed to developers.
MCP toolkit tools can now be disabled.
A FrontendTools type is exported for typing uploaded frontend tool definitions.
MCP toolkit tool names can now be prefixed.
An optional serverId is passed through MCP Apps metadata and host calls to support multi-MCP routing.
Adds support for server-side MCP connection timeouts.
Core exports a shared type for the "concat-content" | "none" union used by the converter and runtimes.
Accepts joinStrategy so consecutive assistant messages can remain separate turns with "none" instead of being merged.
Accepts joinStrategy so consecutive assistant messages can remain separate turns with "none" instead of being merged.
Tool-call parts in the approval-requested state now carry approval metadata, including an id and optional isAutomatic flag.
Tool components can call respondToApproval({ approved, reason? }) to acknowledge approval gates without threading chatHelpers through application context.
Adds the injectQuoteContext helper.
Adds quote.tsx registry components for developers to use.
Adds support for AI SDK error toolOutput.
Adds a custom toCreateMessage callback for creating messages.
Behavior and default changes 6
Skips rewriting unchanged messages after each run.
Pending tool approvals are persisted, and post-approval continuations are appended.
The external store adapter now forwards onResumeToolCall.
Integrates AI SDK v5 data parts in message content.
AI SDK errors are displayed to users.
Uses the assistant UI thread ID remote ID as the thread ID by default.
Fixes and other changes 32
Waits for threadListItem.remoteId instead of latching on the first empty paint.
Cloud history resolves persistence per call, allowing one adapter to serve many threads.
Audio message parts are forwarded as file parts instead of causing an error.
Raw base64 file and image payloads are wrapped in data URLs using the part's media type; data URLs and HTTP sources remain unchanged.
Image media types are resolved from content type, data URL, and leading bytes before falling back to image/png; mismatched data URL envelopes are rebuilt.
Null-body-status responses pass through the wrapper rather than being reconstructed, avoiding a WebKit TypeError for 204, 205, or 304 responses with a non-null empty body.
Streams can resume using IDs discovered after the chat runtime mounts.
AI SDK text and reasoning part state is mapped onto the per-part status.
Data URL schemes are accepted case-insensitively, and parsed MIME types are normalized to lowercase.
MCP Apps reads the canonical nested resource URI pointer and retains the deprecated flat key as a fallback.
Waits for external thread history to load before resuming a stream.
Serializes history persistence to prevent duplicate appends.
The callback now receives the initialized remote thread id as options.id, so integrations building request bodies from it send the correct id.
The default attachment adapter now works without FileReader, including in Node, react-ink, and SSR, using a chunked base64 fallback that does not require Buffer.
AI SDK message creation now preserves direct file parts.
Frontend tool schemas are validated before conversion.
AI SDK message creation now preserves image media types.
MCP toolkit entry names are included in close, connection, and tool-listing errors.
providerMetadata now survives conversion on text, reasoning, and tool-call message parts.
Detects MCP tool name collisions with toolkit tools.
Partial-JSON metadata is attached to streaming tool arguments so consumers can tell which field is still mid-arrival.
React Native and Expo resolve a client-only entry that omits the server toolkit, preventing Metro from reaching Node-only code during bundling.
Distinguishes interrupt and pending tool calls using an actual interrupt or approval field instead of result being undefined.
Fixes a transient requires-action flicker for the approval-responded state.
The request body id is now the real thread id instead of the literal DEFAULT_THREAD_ID.
Preserves the latest thread token usage during pending turns.
All file types are accepted and validated against the adapter's accept constraint.
Assistant file parts are converted to FileMessagePart instead of being dropped.
Preserves runConfig.custom metadata after tool call resume in human-in-the-loop tools.
Uses AI SDK's idGenerator function for new messages.
Correctly initializes the history loading state.
Fixed history loading.