Repository navigation
refactor!: remove every deprecated API and release all packages as 1.0.0 - #1840
Conversation
Remove every deprecated export, option, field, and type alias from all packages, and the internal code that only served them. Remove old wire formats, readers for old saved data, shut-down provider models, and the @tanstack/ai-react-ui, ai-solid-ui, and ai-vue-ui packages.
🦋 Changeset detectedLatest commit: 385a733 The changes in this PR will be included in the next version bump. This PR includes changesets to release 77 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughWarning Review details and warnings were omitted to fit the comment limit. |
|
View your CI Pipeline Execution ↗ for commit daf8962
☁️ Nx Cloud last updated this comment at |
@tanstack/ai
@tanstack/ai-acp
@tanstack/ai-angular
@tanstack/ai-anthropic
@tanstack/ai-bedrock
@tanstack/ai-byteplus
@tanstack/ai-claude-code
@tanstack/ai-client
@tanstack/ai-cloudflare
@tanstack/ai-code-mode
@tanstack/ai-code-mode-snippets
@tanstack/ai-codex
@tanstack/ai-cohere
@tanstack/ai-compaction
@tanstack/ai-computer-local
@tanstack/ai-computer-playwright
@tanstack/ai-computer-sandbox
@tanstack/ai-computer-use
@tanstack/ai-devtools-core
@tanstack/ai-durable-stream
@tanstack/ai-elevenlabs
@tanstack/ai-event-client
@tanstack/ai-fal
@tanstack/ai-gemini
@tanstack/ai-grok
@tanstack/ai-grok-build
@tanstack/ai-groq
@tanstack/ai-isolate-cloudflare
@tanstack/ai-isolate-daytona
@tanstack/ai-isolate-e2b
@tanstack/ai-isolate-node
@tanstack/ai-isolate-quickjs
@tanstack/ai-isolate-quickjs-bun
@tanstack/ai-llmgateway
@tanstack/ai-lovable
@tanstack/ai-mcp
@tanstack/ai-memory
@tanstack/ai-mistral
@tanstack/ai-octane
@tanstack/ai-ollama
@tanstack/ai-ollaya
@tanstack/ai-openai
@tanstack/ai-opencode
@tanstack/ai-openrouter
@tanstack/ai-perplexity
@tanstack/ai-persistence
@tanstack/ai-preact
@tanstack/ai-react
@tanstack/ai-reactor
@tanstack/ai-remix
@tanstack/ai-sandbox
@tanstack/ai-sandbox-blaxel
@tanstack/ai-sandbox-boxd
@tanstack/ai-sandbox-cloudflare
@tanstack/ai-sandbox-daytona
@tanstack/ai-sandbox-docker
@tanstack/ai-sandbox-e2b
@tanstack/ai-sandbox-local-process
@tanstack/ai-sandbox-railway
@tanstack/ai-sandbox-sprites
@tanstack/ai-sandbox-upstash-box
@tanstack/ai-sandbox-vercel
@tanstack/ai-skills
@tanstack/ai-solid
@tanstack/ai-svelte
@tanstack/ai-typesafe
@tanstack/ai-utils
@tanstack/ai-vercel-gateway
@tanstack/ai-vertex
@tanstack/ai-vue
@tanstack/ai-worldlabs
@tanstack/openai-base
@tanstack/preact-ai-devtools
@tanstack/react-ai-devtools
@tanstack/solid-ai-devtools
@tanstack/svelte-ai-devtools
commit: |
The 1.0 client does not send the data copy of forwardedProps. generationParamsFromBody still required body.data, so every generation request to a route that used it failed. The envelope is now found by forwardedProps, and the input comes from forwardedProps.
Server routes in the examples, the e2e app, and the panel still read body.data. The 1.0 client sends the input only in forwardedProps, so these routes now read forwardedProps and no longer fall back to data.
The server definitions of show_notification and display_chart had no outputSchema, but the browser tools had one. The schema hashes did not match, so the client treated the pause as a generic interrupt and did not resume after the tool ran. The removed pre-binding fallback hid this before.
The lockfile moved the ai-vertex dev copy of @google/genai to another peer set. The vertex tests mock @google/genai, but ai-gemini loaded the other copy, so the mock did not apply and the tests failed.
1.0 removed modelOptions.container.skills, so the code block failed the kiira type check. Skills go on codeExecutionTool instead.
Remove the deprecated ComputerUseTool alias that main added, and add the four computer use packages to the 1.0.0 changeset.
Coverage✅ Coverage held across 72 compared package(s). Each package is measured twice in this job — on this PR and on its merge-base with
|
The /api/audio route reads its input from forwardedProps or from the
plain body. The audio page and the devtools generation hooks page still
wrapped the input in { data }, so the route got no provider and failed.
- Stop reading the 0.x interrupt reasons approval_required and client_tool_input in the stream processor. The kind comes from metadata.kind only. These reasons are no longer reserved for MCP input. - Rewrite the tests that asserted the old reason aliases. - Remove the deprecated pending alias from the useChat test titles. - Reword comments, the codemods README, the adapter skill, and CLAUDE.md that still described removed or deprecated APIs. - Move the testing panel chunk tables and sample traces to AG-UI events. - Remove the unused deprecated setHandler from the group chat example.
This removes the pages and members of the deprecated APIs.
# Conflicts: # docs/reference/functions/chat.md # docs/reference/interfaces/ActivityDeltaEvent.md # docs/reference/interfaces/ActivitySnapshotEvent.md # docs/reference/interfaces/AgentLoopState.md # docs/reference/interfaces/ApprovalRequestedEvent.md # docs/reference/interfaces/AudioGenerationOptions.md # docs/reference/interfaces/AudioGenerationResult.md # docs/reference/interfaces/BaseAGUIEvent.md # docs/reference/interfaces/CatalogVoice.md # docs/reference/interfaces/CodeModeConsoleEvent.md # docs/reference/interfaces/CodeModeExecutionStartedEvent.md # docs/reference/interfaces/CodeModeExternalCallEvent.md # docs/reference/interfaces/CodeModeExternalErrorEvent.md # docs/reference/interfaces/CodeModeExternalResultEvent.md # docs/reference/interfaces/CodeModeSnippetCallEvent.md # docs/reference/interfaces/CodeModeSnippetErrorEvent.md # docs/reference/interfaces/CodeModeSnippetResultEvent.md # docs/reference/interfaces/CustomEvent.md # docs/reference/interfaces/DefaultMessageMetadataByModality.md # docs/reference/interfaces/Embedding.md # docs/reference/interfaces/EmbeddingOptions.md # docs/reference/interfaces/EmbeddingResult.md # docs/reference/interfaces/FileChangedEvent.md # docs/reference/interfaces/GeneratedVoice.md # docs/reference/interfaces/ImageGenerationOptions.md # docs/reference/interfaces/ImageGenerationResult.md # docs/reference/interfaces/LazyToolsConfig.md # docs/reference/interfaces/ListVoicesOptions.md # docs/reference/interfaces/ListVoicesResult.md # docs/reference/interfaces/LiveVideoGenerationOptions.md # docs/reference/interfaces/LiveVideoGenerationResult.md # docs/reference/interfaces/MediaInputMetadata.md # docs/reference/interfaces/MessagesSnapshotEvent.md # docs/reference/interfaces/PersistedArtifactRef.md # docs/reference/interfaces/ProviderTool.md # docs/reference/interfaces/RawEvent.md # docs/reference/interfaces/ReasoningEncryptedValueEvent.md # docs/reference/interfaces/ReasoningEndEvent.md # docs/reference/interfaces/ReasoningMessageChunkEvent.md # docs/reference/interfaces/ReasoningMessageContentEvent.md # docs/reference/interfaces/ReasoningMessageEndEvent.md # docs/reference/interfaces/ReasoningMessageStartEvent.md # docs/reference/interfaces/ReasoningStartEvent.md # docs/reference/interfaces/RerankAdapterResult.md # docs/reference/interfaces/RerankOptions.md # docs/reference/interfaces/RerankResult.md # docs/reference/interfaces/ResolvedPromptCache.md # docs/reference/interfaces/ResponseFormat.md # docs/reference/interfaces/RunErrorEvent.md # docs/reference/interfaces/RunFinishedEvent.md # docs/reference/interfaces/RunStartedEvent.md # docs/reference/interfaces/SandboxFileCustomEvent.md # docs/reference/interfaces/SandboxFileDiffEvent.md # docs/reference/interfaces/ServerTool.md # docs/reference/interfaces/SessionIdEvent.md # docs/reference/interfaces/SnippetRegisteredEvent.md # docs/reference/interfaces/StateDeltaEvent.md # docs/reference/interfaces/StateSnapshotEvent.md # docs/reference/interfaces/StepFinishedEvent.md # docs/reference/interfaces/StepStartedEvent.md # docs/reference/interfaces/StructuredOutputCompleteEvent.md # docs/reference/interfaces/StructuredOutputStartEvent.md # docs/reference/interfaces/SubagentErrorEvent.md # docs/reference/interfaces/SubagentFinishedEvent.md # docs/reference/interfaces/SubagentStartedEvent.md # docs/reference/interfaces/SummarizationOptions.md # docs/reference/interfaces/SummarizationResult.md # docs/reference/interfaces/TTSAlignment.md # docs/reference/interfaces/TTSOptions.md # docs/reference/interfaces/TTSResult.md # docs/reference/interfaces/TTSSegment.md # docs/reference/interfaces/TTSTurn.md # docs/reference/interfaces/TextCompactOptions.md # docs/reference/interfaces/TextCompletionChunk.md # docs/reference/interfaces/TextMessageChunkEvent.md # docs/reference/interfaces/TextMessageContentEvent.md # docs/reference/interfaces/TextMessageEndEvent.md # docs/reference/interfaces/TextMessageStartEvent.md # docs/reference/interfaces/TextOptions.md # docs/reference/interfaces/Tool.md # docs/reference/interfaces/ToolCallArgsEvent.md # docs/reference/interfaces/ToolCallChunkEvent.md # docs/reference/interfaces/ToolCallEndEvent.md # docs/reference/interfaces/ToolCallResultEvent.md # docs/reference/interfaces/ToolCallStartEvent.md # docs/reference/interfaces/ToolConfig.md # docs/reference/interfaces/ToolDefinition.md # docs/reference/interfaces/ToolDefinitionInstance.md # docs/reference/interfaces/ToolInputAvailableEvent.md # docs/reference/interfaces/ToolInputRepairContext.md # docs/reference/interfaces/TranscriptionOptions.md # docs/reference/interfaces/TranscriptionResult.md # docs/reference/interfaces/TranscriptionSegment.md # docs/reference/interfaces/TranscriptionWord.md # docs/reference/interfaces/UIResourceEvent.md # docs/reference/interfaces/VideoGenerationOptions.md # docs/reference/interfaces/VideoJobResult.md # docs/reference/interfaces/VideoStatusResult.md # docs/reference/interfaces/VideoStreamResult.md # docs/reference/interfaces/VideoUrlResult.md # docs/reference/interfaces/VoiceGenerationOptions.md # docs/reference/interfaces/VoiceResult.md # docs/reference/interfaces/WorldGenerationAssets.md # docs/reference/interfaces/WorldGenerationOptions.md # docs/reference/interfaces/WorldGenerationResult.md # docs/reference/type-aliases/AGUIEvent.md # docs/reference/type-aliases/AGUIEventType.md # docs/reference/type-aliases/AgentLoopStrategy.md # docs/reference/type-aliases/AnyTool.md # docs/reference/type-aliases/ChatStream.md # docs/reference/type-aliases/EmbeddingContentParts.md # docs/reference/type-aliases/EmbeddingInputItem.md # docs/reference/type-aliases/EmbeddingInputItemFor.md # docs/reference/type-aliases/EmbeddingModality.md # docs/reference/type-aliases/EmbeddingModelInputModalitiesByName.md # docs/reference/type-aliases/FetchWrapper.md # docs/reference/type-aliases/GeneratedAudio.md # docs/reference/type-aliases/GeneratedImage.md # docs/reference/type-aliases/GeneratedMediaSource.md # docs/reference/type-aliases/Interrupt.md # docs/reference/type-aliases/KnownCustomEvent.md # docs/reference/type-aliases/MediaInputRole.md # docs/reference/type-aliases/MediaPrompt.md # docs/reference/type-aliases/MediaPromptFor.md # docs/reference/type-aliases/MediaPromptModality.md # docs/reference/type-aliases/MediaPromptPart.md # docs/reference/type-aliases/ModelInputModalitiesByName.md # docs/reference/type-aliases/PersistedArtifactActivity.md # docs/reference/type-aliases/PersistedArtifactRole.md # docs/reference/type-aliases/PromptCacheOptions.md # docs/reference/type-aliases/PromptCacheRetention.md # docs/reference/type-aliases/RunAgentResumeItem.md # docs/reference/type-aliases/RunFinishedOutcome.md # docs/reference/type-aliases/StreamChunk.md # docs/reference/type-aliases/StreamChunkType.md # docs/reference/type-aliases/StructuredOutputStream.md # docs/reference/type-aliases/TaggedCustomEvent.md # docs/reference/type-aliases/ToolChoice.md # docs/reference/type-aliases/ToolExecuteFunction.md # docs/reference/type-aliases/TranscriptionResponseFormat.md # docs/reference/type-aliases/UsageTotals.md # docs/reference/type-aliases/VoiceOrigin.md # docs/reference/type-aliases/VoiceTrainingStatus.md
TOOL_CALL_START now carries the tool name only in toolCallName, the AG-UI field. The adapter extra toolName is also gone, so adapters no longer send it on TOOL_CALL_START or TOOL_CALL_END. The stream normalizer no longer copies toolName into toolCallName, and the client no longer adds toolName back on inbound chunks.
#1843) * docs: rewrite the docs so a reader can set up each feature in a few minutes Rewrite every hand-written docs page in plain, friendly English. Each page starts with the problem and a short setup that runs. The deep details move to an Advanced part, or to a new advanced page next to it. - Add 23 advanced pages and their nav entries. - Correct facts that did not match the source code. - Keep page URLs and the anchors that other pages link to. * docs: fix the code samples that failed the kiira type check * docs: rewrite the computer use pages and use gpt-6.1-sol in the samples * docs: show the interrupt flow in the tool approval diagram * docs: read toolCallName on TOOL_CALL_START in the OpenAI samples
The docs skill told pages to open with the reader's problem as a short scene. The docs now open with the call and what the reader gets, which answers "is this my page?" in one line. Encode that, and add the rule the rewrite missed on some pages: the opener is said once, so the next paragraph starts the steps or adds a new fact. Co-Authored-By: Claude <noreply@anthropic.com>
The call-first openers landed above the old intro paragraphs, so 42 pages repeated the opener, kept a "X fixes this." line whose problem was cut, or kept a broken "createChatHook from ..." fragment (all eight UI framework pages). Remove the repeats and orphaned lines, keep each new fact as one sentence, and fix the fragments. Openers are unchanged. Co-Authored-By: Claude <noreply@anthropic.com>
- chat(), ChatClient, GenerationClient and VideoGenerationClient throw a clear error when threadId is missing or empty. The type already required it; a JS caller got persistence keyed "undefined" and runs with no thread. Drops two guards that could no longer fire. - A 0.x bare UIMessage[] in client persistence logs an error and is not overwritten by the next save, so the history is not lost. - retrieveBlob throws a clear error for a 0.x artifact record with no blobKey, instead of a misleading not-found. - A 0.x unbound tool interrupt record logs a warning that it stays pending. - A client tool or approval interrupt whose server and client schemas differ logs a warning naming the tool before it falls back to a generic interrupt. Co-Authored-By: Claude <noreply@anthropic.com>
GenerationParams typed threadId and runId as optional and the parser also took a bare input body, a 0.x shape with no ids. 1.0 generation functions need a threadId, so every route repeated an `if (!threadId) return 400` check. AG-UI RunAgentInput requires both ids, and chatParamsFromRequestBody already does. - generationParamsFromBody reads only the envelope and throws when threadId or runId is missing or empty. Drops the bare-input branches and three helpers. - Remove the per-route threadId checks and optional runId spreads from docs, the media-generation skill, and the examples. Co-Authored-By: Claude <noreply@anthropic.com>
69a3bbe made chat(), ChatClient, GenerationClient and VideoGenerationClient throw at runtime on a missing threadId. Tests that called them without one now failed, and tests that checked the "connection or fetcher" error hit the threadId error first. Pass a threadId so each test reaches the case it is about. Co-Authored-By: Claude <noreply@anthropic.com>
- ai-client devtools: the bridge threadId is required, so drop
withLiveClientIdentity, the `?? ''` fallbacks, the always-true branch,
and the `const client = this` getters in the three clients.
- ai-client: drop the restoreInboundUsage alias and a `?? {}` on a spread.
- Framework generation hooks: drop the `Omit<..., 'persistence' |
'threadId'> & GenerationPersistenceOptions` that re-added what it
removed (43 signatures), and the persistenceProps temporary in 8 files.
- ai-react: delete tool-result-content.ts; its only caller was deleted.
- ai: one WithOptionalThreadId type, reused by BoundTextActivityOptions,
bound calls, and createChatOptions, which reuses BoundTextActivityOptions
instead of a copy. Drop the 0.x nested RUN_ERROR copy in
normalizeStreamChunk.
- ai-persistence: artifactBlobKey is a local function in middleware.ts;
simplify the resume guard.
Co-Authored-By: Claude <noreply@anthropic.com>
testing/e2e/tsconfig.json only included src/, so tsc never saw tests/. Include it and fix the 20 errors with narrowing and real types, no casts: - multi-turn-reasoning never ran: a stale-branch squash merge (98979f7) dropped the feature from the E2E registry, so the spec matched no providers. Restore it for Anthropic. - delivery-durability: "a second tab joins an existing run" parsed the producing tab's output but never compared it. Assert both tabs match. - web-mcp-tools: the local registration type required `options`, which Chrome does not pass. Make it optional. - getMessages() returns UIMessage[] instead of any[]; narrow the reads that exposed. Type guards for tool-call events, typed fixtures. Co-Authored-By: Claude <noreply@anthropic.com>
…code pass Chrome calls a registered WebMCP tool's execute(input) with no options, and the function TanStack AI registers already takes optional options. The internal WebMCPTool interface required them. Co-Authored-By: Claude <noreply@anthropic.com>
- ai-octane: include tests/ in the type check. Type the chat-ui test callbacks with the real ai-client UI types, add a declaration for the SSR fixture, and resolve @octanejs/testing-library subpaths through a tsconfig paths entry that mirrors the vite alias. Fix two test bugs: "preserves unrelated caller metadata" passed a field the hook does not accept, and a TEXT_MESSAGE_CONTENT event carried a `content` field. - ts-remix-chat: type-check its tests; build the test router with the render middleware the app's RouterTypes expects. - e2e: type-check the Playwright config and global setup/teardown. Drop a `duration` field aimock never reads, and type the aimock global instead of casting globalThis. - ts-solid-chat: delete three files nothing imported. Co-Authored-By: Claude <noreply@anthropic.com>
The repo was on oxlint-tsgolint 0.24, the pre-TypeScript-7 line, and `^0.24.0` can never reach 7.x. oxlint 1.89 requires oxlint-tsgolint >= 7.0.2003. Bump oxlint, oxlint-plugin-eslint and oxlint-tsgolint together. The only new finding across all 76 linted projects: a zero-width space in an ai-skills doc comment, used to break up `**/`. Write the path as `skills/<name>/SKILL.md` instead. Co-Authored-By: Claude <noreply@anthropic.com>
The hand-written create-ui and create-chat-hook .tsrx.d.ts files had drifted to ComponentBody<any> and loose prop shapes. Replace them with the real declaration emit, export the part and interrupt mixin types, drop the hand-copied test aliases, and add a typetest that fails if the declarations loosen again. The docs sample now uses ToolProps directly.
This reverts commit 82aad9d.
# Conflicts: # docs/adapters/opencode.md # docs/advanced/middleware.md # docs/chat/subagents.md # docs/config.json # docs/mcp/server.md # docs/persistence/chat-persistence.md # packages/ai-persistence/src/middleware.ts
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
tombeckenham
left a comment
There was a problem hiding this comment.
Thanks for driving 1.0. Checked the deprecated-API removals and the required threadId, merged main twice (conflicts moved onto the split docs pages), fixed the new activity test for threadId, and CI is green.
Resolve conflicts with the 1.0 release (#1840) and the subagent resume fix (#1806): - ai-persistence: use main's rejectForgedChildSplit with the branch's durableGenericResumeState (interrupts store arg). - Docs: take main's split pages, and port the branch's additions (onGuardToolCall, passEnv, session stores, harness links) to the new -advanced pages. - Adapt to removed APIs: required threadId on chat() and activities, required ArtifactRecord.blobKey, no toolName on TOOL_CALL_START, z.object inputSchema for MCP registerTool, single threadId on ToolExecutionContext.
Read
docs/migration/v1.mdfirst. It lists every removed API and its replacement. This PR removes every API that 0.x marked as deprecated, and adds amajorchangeset that moves all 76 published packages to1.0.0.🎯 Changes
Doc openers. Each guide now starts with the call and what it does. The scene-setting first paragraph is gone.
Deprecated APIs. Removed all
@deprecatedexports, options, fields, and type aliases. Each one had a replacement in 0.x.addToolApprovalResponse(). Removed fromChatClientand every chat hook. UseresolveInterrupton the boundtool-approvalinterrupt. The devtools eventtools:approval:respondedis also removed.Old wire formats. Removed the CUSTOM
approval-requestedandtool-input-availableevents, the[DONE]SSE line, thedatacopy offorwardedProps, interrupts with no binding (and theirapproval_requiredandclient_tool_inputreasons), and the STEP events that adapters sent next toREASONING_*events.Old saved data. Removed the readers for 0.x formats: old Cloudflare run-log records, a bare
UIMessage[]from client persistence, and artifact records withoutblobKey. A 0.x Cloudflare run-log record now throws an error that says to migrate first. The stall watchdog skips these records, so it cannot mark a finished 0.x run as failed.Generation requests.
generationParamsFromRequestandgenerationParamsFromBodynow read the input fromforwardedProps, because the hooks no longer senddata. The examples,testing/e2e, andtesting/panelroutes readforwardedPropstoo, and the E2E audio callers send the input as the plain body.Last leftovers. Removed the old interrupt reason fallbacks in the stream processor. Regenerated
docs/referencefrom the 1.0 source, so the pages for removed types are gone. Moved thetesting/panelchunk tables and sample traces to AG-UI events. Fixed comments, codemod notes, a skill, andCLAUDE.mdthat still talked about deprecated APIs.toolNamealias. RemovedtoolNamefromTOOL_CALL_START. ReadtoolCallName, the AG-UI field. Adapters no longer sendtoolNameonTOOL_CALL_STARTorTOOL_CALL_END, and the stream normalizer no longer copies it.threadIdis required. Every chat and generation API that takes athreadIdnow requires it:chat(),summarize(), thegenerate*activities,ChatClient,GenerationClient, and every chat and generation hook in every framework.getVideoJobStatus()keeps it optional, because it only polls a job. Inside a chat run, tools getctx.threadId. It is missing only when a tool runs outside a chat (MCP server, WebMCP, a directexecute()call). The code that made up a thread id is gone, and so areresolveDurableThreadIdandDurableThreadIdRequiredErrorfrom@tanstack/ai-sandbox.createChatOptions()keeps it optional, so thechat()call passes it. No code makes up a conversation thread id any more: the connection adapters require a run context, and the sandbox tool bridges pass the run's thread id to harness tools. Internal one-shot calls use derived ids:<threadId>:compactionand<threadId>:snippets. Subagent bound calls (ctx.chat,ctx.generateImage) take an optionalthreadId, because the binding fills in the child id. The generationfetchergets{ signal, threadId, runId }. Every doc sample, example, and test passes athreadId.Packages and models. Deleted
@tanstack/ai-react-ui,ai-solid-ui, andai-vue-ui(use@tanstack/ai-<framework>/ui). Removed provider models that are shut down.Samples that kiira could not check. A sample that passes a value from a relative import (
./tools) intochat()is not fully type-checked by kiira 0.6.0 (bug: unresolved relative imports silence type errors in calls that use them AlemTuzlak/kiira#44). 10 of these samples had nothreadId, or used the removeduseChatidoption. They are fixed inag-ui-compliance.md,migration-from-vercel-ai-advanced.md, andapproval-flow-processing.md.Fixes from the full review. A review of all 1,337 files that are not generated found these, and this PR fixes them:
ai-octaneuseChatnow sendsbyokandbyokProviderto the client, like the other framework hooks.ai-mistralandai-octaneuseworkspace:^for published dependencies.ai-solidREADME was a copy of the React README. It is now a Solid README.threadIdand read the 1.0 request fromforwardedProps. Six samples that ran but did the wrong thing are fixed, and twelve false claims are corrected.persistenceandsandboxinline, so kiira checks them.needsApproval, because it cannot pause for an approval (Harness tools with needsApproval run without approval through the sandbox tool bridge #1854).stream()andrpcStream()pass the run's AG-UIRunAgentInputto the factory as a 4th argument. A server function reads it withchatParamsFromRequestBody, sothreadId,runId, and interruptresumeget through. Before, onlymessagesanddatadid, so interrupts could not resume over a server function.createChatHooksentence on the 8 UI pages). The docs skill now says to open with the call and say it once.chat(),ChatClient,GenerationClient, andVideoGenerationClientthrow a clear error whenthreadIdis missing or empty, not only a type error.UIMessage[]logs an error and is not overwritten,retrieveBlobthrows for an artifact with noblobKey, and an unbound 0.x interrupt record logs a warning. A client tool whose server and client schemas differ logs a warning.generationParamsFromBody()andgenerationParamsFromRequest()requirethreadIdandrunIdand return them as strings, the same aschatParamsFromRequestBody()and AG-UIRunAgentInput. A body that holds only the input is rejected. The per-routeif (!threadId)checks are gone from docs, the media-generation skill, and the examples.threadIdcould be missing or late: the devtools?? ''fallbacks and getter wrappers, arestoreInboundUsagealias, 43 framework hook signatures that removed and re-addedpersistenceandthreadId, and thepersistencePropstemporaries.WithOptionalThreadIdis now one type instead of three copies. 615 lines removed, 186 added.testing/e2e/tests, the e2e Playwright setup,ai-octane/tests, and thets-remix-chattests. That found real test bugs:multi-turn-reasoninghad matched no providers since a stale merge, and a durability test never compared the two tabs. The WebMCPexecutetype now matches what Chrome passes.@tanstack/ai-octane/uitypes are strict. The hand-written.tsrx.d.tsfiles forcreateChatUIandcreateChatHookhad drifted toany. They are now the compiler output for the.tsrxsource. Render children are typed,ToolPropstypes the tool input and output, and a new type test fails if the files loosen again. Octane.tsrxtype checking is still blocked upstream (oxc-tsrx-lint --type-check ignores the package tsconfig (checks .tsrx as React JSX) and requires exactly oxlint-tsgolint 7.0.2002 tsrx-org/oxc#218).oxlintandoxlint-plugin-eslintare at 1.89, andoxlint-tsgolintis at 7.0.2004.ai-vertextests load one copy of@google/genai. pnpm resolves two copies, and the mock did not apply to the copy thatai-geminiuses.needsApprovalran with no approval through a harness adapter, because the sandbox tool bridge calledexecute()directly (Harness tools with needsApproval run without approval through the sandbox tool bridge #1854).createToolBridgeCore()now throws when it gets such a tool, andexecuteHostTool()rejects it.docs/structured-outputs/harnesses.mdand the changeset say so.docs/comparison/vercel-ai-sdk.md. The Details page is gone (it was new in this PR). The page says to stay on the AI SDK only if your app already speaks its UI Message Stream protocol. It lists the reasons from the TanStack AI home page, and the feature table now matches the current packages: the official Cloudflare adapter, the Vercel AI Gateway adapter and the other gateways, memory, compaction, computer use, and live worlds. A missing provider points to OpenRouter, Vercel AI Gateway,openaiCompatible, a request in Discussions, or the community adapter guide.docsskill no longer stops to ask about readers and tone. It states them in one line each and keeps writing. The.claude,.agents, and.grokcopies are the same.Merged
mainup to #1850.mainadded facts to pages that this PR splits, so they moved to the new pages:callMetadatato Middleware: Advanced,childResumeIdsto Subagents: Advanced, snapshot metadata to Chat Persistence: Advanced, the MCP extension section under Advanced inmcp/server.md, and the OpenCode stream notes to its How it works list. InwithPersistence, the resume path keeps the 1.0 shape and addsrejectForgedChildSplitfrom #1806.These items stay on purpose:
max_tokens).approval-requestedevent. It is a current feature with a different payload.RunErrorEvent.error. It is a current field. Only the client fallback that read it is removed.Docs: the new page
docs/migration/v1.mdis the upgrade guide.docs/migration/create-ui.mdis deleted and its content moved into the new page. About 50 docs pages, skills, and READMEs no longer show removed APIs.✅ Checklist
pnpm run test:pr, or these tests do not apply to this pull request.docs/for this change, or this change is not user-facing.pnpm changeset), or this PR does not change a published package.🚀 Release Impact
Testing
Commands run (all pass):
test:typeson the 26 changed packages, after a build of their workspace dependencies.oxlintandvitest run --maxWorkers=2on the changed test files in each changed package.pnpm test:docsandkiiraon the changed docs pages.pnpm changeset status: 76 packages go to1.0.0(this includes the 4 new computer use packages from main).pnpm test:kiira: 1813 of 1813 snippets.packages/ai/tests/generation-params.test.tsand the ai-vertexfactories.test.ts.vitestonai-clientchat-client-interrupts.test.tsandaimcp-input-interrupt.test.tsandstream-processor.test.ts.test:typesforai,ai-client,ai-devtools,ai-code-mode,testing/panel, andexamples/ts-group-chat.pnpm generate-docs, thenpnpm test:docs.test:typesfortesting/e2e,testing/panel,examples/ts-react-chat,examples/sandbox-web, andexamples/sandbox-cloudflare.vitestonai-sandbox-cloudflarerun-log-do.test.tsandrun-log-watchdog.test.ts, and the newai-octaneuse-chat-byok.test.ts.tsconai-sandbox-cloudflareandtest:typesonai-octane.oxlintandoxfmton the changed files.kiiraon the 28 changed docs pages (144 snippets) and on the changed skills.pnpm generate-docs.vitestonai-vertex(12 of 12).vitestonai-clientconnection-adapters.test.ts(54 of 54). Two new tests read the factory'sinputwithchatParamsFromRequestBody.tsconaiandai-client.kiiraon the 6 changed docs and skill files (87 snippets).main(the tool'sexecute()runs, through both the bridge andexecuteHostTool()) and passes with the fix.vitestonai-sandboxbridge-jsonrpc.test.tsandremote-tools.test.ts(20 of 20).pnpm test:docsafter the Vercel AI SDK comparison merge: no broken links.One Solid test file,
tests/chat-ui/text-part.test.tsx, does not load on Windows (@solid-refreshfile-URL error). This PR does not change that file.Not run locally, CI runs them:
pnpm test:pras a whole, E2E, the full unit suites, knip, and the typecheck oftesting/e2e,testing/panel, and the example apps.Manual test:
pnpm changeset statusand make sure that every published package shows1.0.0.grep -rn "@deprecated" packages/*/src. It prints nothing.docs/migration/v1.mdand follow the steps on one example app, for exampleexamples/ts-react-chat.How this PR makes testing easy: the existing unit tests and the E2E suite were updated to the 1.0 APIs. The example apps and
testing/e2euse only the 1.0 APIs, so the CI typecheck and E2E runs cover the call sites.Linked issues
Closes #1854
Risk / rollback
[DONE]now gets a parse error on the client..client()tool have the same schemas. If they differ, the pause shows as a generic interrupt. The E2E tool fixtures had this mismatch, and this PR fixes them./docs/migration/create-uinow returns 404.npm deprecateby hand on the three deleted-uipackages.needsApprovaltool to a harness adapter now gets an error at run start. It must removeneedsApproval, or run that tool with an HTTP adapter.Rollback: revert this PR before the Version Packages PR merges. After publish, a revert needs a new release.
Public API change
Before
After
stream()andrpcStream()get the run input