@tanstack/ai-client breaking changes
Updated December 4, 2026
On this page
Latest version 1.4.0, released November 30, 2026. Source repository
Packages on npm run on Node.js. Node.js end of life dates.
- From 0.40.0 to 1.2.1: 48 breaking changes in 5 versions.
- From 0.8.0 to 1.2.1: 249 breaking changes in 32 versions.
@tanstack/ai-client 1.2.1 breaking changes
- Behavior changed
fromChatTransport
The connection now reads threadId, tools and outputSchema from useChat, so code that passes them to fromChatTransport should stop doing so. github.com - Signature changed
ConnectConnectionAdapter.joinRun
Was joinRun?: (runId: string, abortSignal?: AbortSignal) => AsyncIterable<StreamChunk>; now joinRun?: (runId: string, abortSignal?: AbortSignal, config?: ChatRunConfig) => AsyncIterable<StreamChunk>. npmjs.com - Signature changed
joinRun
joinRun now gets the ChatRunConfig (threadId, tools, outputSchema) as its third argument. Code that calls joinRun with the older arguments should check whether it relies on the old call shape. github.com - Signature changed
ResumableConnectConnectionAdapter.joinRun
Was joinRun: (runId: string, abortSignal?: AbortSignal) => AsyncIterable<StreamChunk>; now joinRun: (runId: string, abortSignal?: AbortSignal, config?: ChatRunConfig) => AsyncIterable<StreamChunk>. npmjs.com - Signature changed
SubscribeConnectionAdapter.joinRun
Was joinRun?: (runId: string, abortSignal?: AbortSignal) => AsyncIterable<StreamChunk>; now joinRun?: (runId: string, abortSignal?: AbortSignal, config?: ChatRunConfig) => AsyncIterable<StreamChunk>. npmjs.com
@tanstack/ai-client 1.2.0 breaking changes
- Behavior changed
chatParamsFromRequest
The server owns result metadata; chatParamsFromRequest keeps only the tanstack key on the tool rows of a request, so other metadata keys from clients are dropped. github.com - Behavior changed
tool definition
Client tools and WebMCP tools throw if they call setResultMetadata; only server tools can send result metadata. github.com
@tanstack/ai-client 1.1.1 breaking changes
- Behavior changed
text:chunk:thinking
Devtools previously got the id of the reasoning step as the text in text:chunk:thinking; it now gets the thinking text. Code that read the old id from this event must be updated. github.com
@tanstack/ai-client 1.1.0 breaking changes
- Behavior changed
Queued messages are now held while a run is paused on an interrupt, such as a tool approval, and are sent only after the run that answers the interrupt ends with success. Code that relied on the queue sending right after a paused run ends... github.com - Behavior changed
options.signal
An abort of options.signal now ends the chat the same way stop() does, so it no longer counts as a finished run. Code that treats that abort as a completed run must change. github.com - Behavior changed
RealtimeClient.disconnect
A disconnect() during connect() now sets the realtime status to idle rather than error. Code that checks for the error status after such a disconnect must be updated. github.com - Signature changed
McpAppBridge.callTool
Was callTool: (input: {serverId?: string; toolName: string; args?: Record<string, unknown>; messageId?: string;}) => Promise<unknown>; now callTool: (input: {serverId?: string; toolName: string; args?: Record<string, unknown>; messageId?... npmjs.com
@tanstack/ai-client 1.0.0 breaking changes
- Removed
Deprecated exports, options, fields and type aliases from 0.x are gone. Move to the replacement that shipped in 0.x, as described in the 1.0 upgrade guide. github.com - Removed
body
Pass extra request fields as forwardedProps instead of body in ChatClient, updateOptions, and chat hooks. tanstack.com - Removed
BoundInterruptBase.error
Use errors instead. npmjs.com - Removed
Chat
Build the chat UI with createChatHook and supply your own components instead of Chat, ChatMessages, ChatMessage and ChatInput. tanstack.com - Removed
ChatClient.addToolApprovalResponse
Resolve the bound tool-approval interrupt with resolveInterrupt instead of calling addToolApprovalResponse. npmjs.com - Removed
ChatClient.getPendingInterrupts
Call getInterrupts in place of getPendingInterrupts. npmjs.com - Removed
ChatClient.resumeInterrupts
Resolve each interrupt with its own methods instead of calling resumeInterrupts. npmjs.com - Removed
ChatInterruptState.pendingInterrupts
Read interrupts instead of pendingInterrupts from the chat hook result. npmjs.com - Removed
getVideoUrl
Implement getVideo in custom video adapters and call getVideoJobStatus in app code. tanstack.com - Removed
InterruptManager.resolveToolApprovalDecision
InterruptManager.resolveToolApprovalDecision was removed in @tanstack/ai-client 1.0.0 npmjs.com
And 26 more in this version. Sign up to see every change
@tanstack/ai-client 0.40.0 breaking changes
- Behavior changed
chat
When a run uses sessionId or background, chat() throws if an agent's inputSchema uses that name. Rename such fields. github.com - Behavior changed
messages
In-place changes such as messages.push() now throw a TypeError. Use setMessages to change messages. github.com - Behavior changed
RealtimeClient.connect
When connect() connects, it clears messages and pending transcripts from the previous session. A failed connection keeps the previous transcript. github.com - Behavior changed
RealtimeClient.interrupt
interrupt() also clears the pending assistant transcript, which it did not do before. github.com - Signature changed
ChatClient.setMessagesManually
Was setMessagesManually(messages: Array<UIMessage<TTools>>): void; now setMessagesManually(messages: ReadonlyArray<UIMessage<TTools>>): void. npmjs.com - Signature changed
RealtimeClient.messages
Was readonly messages: Array<RealtimeMessage>; now readonly messages: ReadonlyArray<RealtimeMessage>. npmjs.com - Signature changed
RealtimeClientState.error
Was error: Error | null; now readonly error: Error | null. npmjs.com - Signature changed
RealtimeClientState.messages
The messages type is ReadonlyArray now. Code that passes messages to a function typed as a mutable array must type that parameter as ReadonlyArray<UIMessage>. npmjs.com - Signature changed
RealtimeClientState.mode
Was mode: RealtimeMode; now readonly mode: RealtimeMode. npmjs.com - Signature changed
RealtimeClientState.pendingAssistantTranscript
Was pendingAssistantTranscript: string | null; now readonly pendingAssistantTranscript: string | null. npmjs.com
And 4 more in this version. Sign up to see every change
Older versions
27 older versions, each with its first changes. Sign up to see every change
Show 27 older versions
@tanstack/ai-client 0.39.0 breaking changes
- Signature changed
chat
With stream set to false, chat() resolves to a ChatResult with text and chunks rather than a string. Change const text = await chat({ stream: false }) to const { text } = await chat({ stream: false }). github.com - Signature changed
streamToText
streamToText() now resolves to a ChatResult with text and chunks rather than a string. Destructure text from the result to keep the old value. github.com
@tanstack/ai-client 0.38.0 breaking changes
- Signature changed
StructuredOutputPart.data
After checking part.status === 'complete', data is always set. Schemas typed as UIMessage must split the structured-output part by status and make data required for 'complete'. github.com
@tanstack/ai-client 0.37.0 breaking changes
- Signature changed
MessagePart
Was type MessagePart<TTools extends ReadonlyArray<{name: string;}> = any, TData = unknown, TSubagents extends ReadonlyArray<SubagentClientAgent> | undefined = undefined> = TextPart | ImagePart | AudioPart | VideoPart | DocumentPart |... npmjs.com - Signature changed
ui:ChatUIPartKey
Was type ChatUIPartKey = 'text' | 'image' | 'audio' | 'video' | 'document' | 'thinking' | 'toolCall' | 'toolResult' | 'structuredOutput' | 'uiResource' | 'subagent'; now type ChatUIPartKey = 'text' | 'image' | 'audio' | 'video' |... npmjs.com
And 2 more in this version.
@tanstack/ai-client 0.35.1 breaking changes
- Behavior changed
ChatClient
When loading a thread with persistence enabled fails, status is now 'error', error is set, and onError fires instead of failing silently. Code that treated a failed load as an empty thread should handle the error state. github.com
@tanstack/ai-client 0.34.0 breaking changes
- Behavior changed
fromSpecTokenUsage
For runs with more than one RUN_FINISHED.usage entry, fromSpecTokenUsage now reports the total of all entries. Code that expected only the first entry's numbers will see different values. github.com - Behavior changed
RUN_FINISHED.usage[]
Token usage from subagent runs is added to the parent RUN_FINISHED.usage[] array, so totals read from it will be higher when subagents run. github.com
And 12 more in this version.
@tanstack/ai-client 0.33.1 breaking changes
- Signature changed
SpeechGenerateInput.text
Was text: string; now text?: string. npmjs.com
@tanstack/ai-client 0.32.0 breaking changes
- Behavior changed
withPersistence
withPersistence merges incoming messages by id, so a shorter client list keeps stored extra messages. Code that assumed the stored list was replaced should be checked. github.com - Signature changed
ChatPersistenceOptions
Was type ChatPersistenceOptions<TTools extends ReadonlyArray<AnyClientTool> = any> = {persistence: true; threadId: string;} | {persistence: ChatClientPersistence<TTools>; threadId: string;} | {persistence?: false | undefined; threadId?... npmjs.com
And 4 more in this version.
@tanstack/ai-client 0.31.0 breaking changes
- Configuration changed
defineByok
defineByok takes providers; a send for a provider with companions carries every x-byok-* header and prompts for each missing value. Existing callers should pass providers to get the companion behavior. github.com
@tanstack/ai-client 0.29.0 breaking changes
- Removed
WireMessage
The public WireMessage union no longer includes outbound activity messages. Code that constructs or narrows on that variant must be updated. github.com - Signature changed
WireMessage
System and user messages in the public WireMessage type now require a content field. Code that builds these messages without content must add it. github.com
@tanstack/ai-client 0.28.0 breaking changes
- Signature changed
GenerationClient.updateOptions
Was updateOptions(options: Partial<Pick<GenerationClientOptions<TInput, TResult, TOutput>, 'body' | 'onResult' | 'onError' | 'onProgress' | 'onChunk'>>): void; now updateOptions(options: Partial<Pick<GenerationClientOptions<TInput... npmjs.com - Signature changed
VideoGenerationClient.updateOptions
Was updateOptions(options: Partial<Pick<VideoGenerationClientOptions<TOutput>, 'body' | 'onResult' | 'onError' | 'onProgress' | 'onChunk' | 'onJobCreated' | 'onStatusUpdate'>>): void; now updateOptions(options... npmjs.com
@tanstack/ai-client 0.26.0 breaking changes
- Behavior changed
Extras such as tool names and token usage no longer appear on SSE/HTTP wire events. Read them from metadata.tanstack instead, and use sendMessage({ content, metadata }) to stamp user metadata. github.com - Behavior changed
Wire messages no longer carry a parts field; read content, toolCalls and fan-out roles instead. github.com
@tanstack/ai-client 0.25.1 breaking changes
- Removed
UnboundInterrupt.cancel
UnboundInterrupt.cancel was removed in @tanstack/ai-client 0.25.1 npmjs.com - Removed
UnboundInterrupt.clearResolution
UnboundInterrupt.clearResolution was removed in @tanstack/ai-client 0.25.1 npmjs.com
And 24 more in this version.
@tanstack/ai-client 0.24.0 breaking changes
- Removed
GenerationClientOptions.id
Use GenerationClientOptions.threadId instead. npmjs.com - Removed
id
Chat and generation clients no longer accept a separate id option. Pass threadId instead. github.com
And 6 more in this version.
@tanstack/ai-client 0.23.0 breaking changes
- Removed
artifactBlobKey
artifactBlobKey is no longer exported; use resolveArtifactBlobKey for reads. github.com - Removed
ChatResumeSnapshot
ChatResumeSnapshot is no longer exported from @tanstack/ai-client. github.com
And 34 more in this version.
@tanstack/ai-client 0.22.0 breaking changes
- Behavior changed
sendMessage
Messages sent while a stream is in flight are now queued and sent once it settles, rather than being dropped. To keep the previous drop-while-busy behavior, pass queue: 'drop'. github.com - Signature changed
ChatClient.sendMessage
Was sendMessage(content: string | MultimodalContent, body?: Record<string, any>): Promise<void>; now sendMessage(content: string | MultimodalContent, body?: Record<string, any>, sendOptions?: SendMessageOptions): Promise<void>. npmjs.com
@tanstack/ai-client 0.21.0 breaking changes
- Behavior changed
ToolCallPart.approval
On a typed mixed tool-call union, reading part.approval without narrowing by part.name no longer compiles. Runtime behavior is unchanged; narrow by tool name or type the handler against the base ToolCallPart. github.com
@tanstack/ai-client 0.20.0 breaking changes
- Signature changed
TranscriptionGenerateInput.responseFormat
Was responseFormat?: 'json' | 'text' | 'srt' | 'verbose_json' | 'vtt'; now responseFormat?: TranscriptionResponseFormat. npmjs.com
@tanstack/ai-client 0.19.0 breaking changes
- Signature changed
InferGenerationOutput
Was type InferGenerationOutput<TResult, TFn> = TFn extends (result: any) => infer R ? [Exclude<R, null | void | undefined>] extends [never] ? TResult : Exclude<R, null | void | undefined> : TResult; now type InferGenerationOutput<TResult... npmjs.com - Signature changed
MessagePart
Was type MessagePart<TTools extends ReadonlyArray<AnyClientTool> = any, TData = unknown> = TextPart | ImagePart | AudioPart | VideoPart | DocumentPart | ToolCallPart<TTools> | ToolResultPart | ThinkingPart | StructuredOutputPart<TData>... npmjs.com
@tanstack/ai-client 0.18.0 breaking changes
- Signature changed
ImageGenerateInput.prompt
Was prompt: string; now prompt: MediaPrompt. npmjs.com - Signature changed
VideoGenerateInput.prompt
Was prompt: string; now prompt: MediaPrompt. npmjs.com
@tanstack/ai-client 0.17.0 breaking changes
- Behavior changed
ToolCallState
When a tool execution produces an output error, the tool-call part now ends in state 'error' rather than 'input-complete'. Code that waits for 'input-complete' or treats it as final must also handle 'error'. github.com
@tanstack/ai-client 0.15.0 breaking changes
- Behavior changed
Tools returning undefined or null are now checked against outputSchema, so a schema that forbids those values reports an output-error. Make the schema allow null or undefined if those returns are intended. github.com - Signature changed
ChatClient
Was class ChatClient; now class ChatClient<TTools extends ReadonlyArray<AnyClientTool> = any, TContext = unknown>. npmjs.com
And 8 more in this version.
@tanstack/ai-client 0.14.0 breaking changes
- Signature changed
AnyClientTool
Was export {type AnyClientTool} from "@tanstack/ai"; now export {type AnyClientTool} from "@tanstack/ai/client". npmjs.com - Signature changed
BatchStrategy
Was export {BatchStrategy} from "@tanstack/ai"; now export {BatchStrategy} from "@tanstack/ai/client". npmjs.com
And 24 more in this version.
@tanstack/ai-client 0.13.0 breaking changes
- Signature changed
ChatClientOptions
Was type ChatClientOptions<TTools extends ReadonlyArray<AnyClientTool> = any> = {initialMessages?: Array<UIMessage<TTools>>; id?: string; threadId?: string; forwardedProps?: Record<string, any>; body?: Record<string, any>; onResponse?... npmjs.com - Signature changed
createChatClientOptions
Was function createChatClientOptions<const TTools extends ReadonlyArray<AnyClientTool>>(options: ChatClientOptions<TTools>): ChatClientOptions<TTools>; now function createChatClientOptions<const TTools extends ReadonlyArray<AnyClientTool>... npmjs.com
And 2 more in this version.
@tanstack/ai-client 0.12.0 breaking changes
- Removed
ChatClientOptions.body
ChatClientOptions.body was removed in @tanstack/ai-client 0.12.0 npmjs.com - Removed
ChatClientOptions.connection
ChatClientOptions.connection was removed in @tanstack/ai-client 0.12.0 npmjs.com
And 22 more in this version.
@tanstack/ai-client 0.11.0 breaking changes
- Behavior changed
useChat
When outputSchema is set, assistant text accumulates into the typed structured-output part instead of a TextPart. Code that filtered out TextParts to hide raw JSON can drop that filter, and leaving it in place is also safe. github.com - Signature changed
MessagePart
Was type MessagePart<TTools extends ReadonlyArray<AnyClientTool> = any> = TextPart | ImagePart | AudioPart | VideoPart | DocumentPart | ToolCallPart<TTools> | ToolResultPart | ThinkingPart; now type MessagePart<TTools extends... npmjs.com
And 2 more in this version.
@tanstack/ai-client 0.10.0 breaking changes
- Behavior changed
The client POSTs an AG-UI RunAgentInput body instead of {messages, data}, so server endpoints must use chatParamsFromRequestBody and mergeAgentTools. Upgrade @tanstack/ai-client and @tanstack/ai together. github.com - Signature changed
ChatClient.updateOptions
Was updateOptions(options: {connection?: ConnectionAdapter; body?: Record<string, any>; tools?: ReadonlyArray<AnyClientTool>; onResponse?: (response?: Response) => void | Promise<void>; onChunk?: (chunk: StreamChunk) => void; onFinish?... npmjs.com
And 2 more in this version.
@tanstack/ai-client 0.8.0 breaking changes
- Behavior changed
Adds audio generation hooks and streaming support in 0.8.0 with no breaking changes in @tanstack/ai-client 0.8.0 github.com - Signature changed
TranscriptionGenerateInput.audio
Was audio: string | File | Blob; now audio: string | File | Blob | ArrayBuffer. npmjs.com
Related packages
- @tanstack/ai
- @tanstack/ai-react
- @tanstack/ai-gemini
- @tanstack/ai-anthropic
- @tanstack/ai-ollama
- @tanstack/ai-openai
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.