Repository navigation
@tanstack/ai@0.61.0
Minor Changes
- #1381
a0f7c14- Add@tanstack/ai-worldlabswithworldlabsWorld()for Marble world generation throughgenerateWorld(). World Labs jobs return a viewer URL and splat/mesh assets.WorldGenerationResultnow has optionalurl,worldId,operationId, andassetsso job adapters can omit a live-session token.
Patch Changes
-
#1469
54d39d3- Keep Anthropic's signed thinking order when a provider-executed tool (web_search / web_fetch) runs inside the same response as thinking, and stop provider-executed calls from being classified as client tool interrupts.uiMessagesToWirenow splits an assistant message into ordered segments at every thinking part that follows a provider-executed tool call (the rulebuildAssistantMessagesalready applies), instead of emitting allreasoningmessages first and one anchor with the joined text and every tool call. Later anchors get${id}-segment-${n}ids.- The run loop records the iteration's thinking, text and tool calls in arrival order and writes one assistant
ModelMessageper segment, so the interruptMESSAGES_SNAPSHOTand the server-side continuation history keep the order too. getBoundaryActionableToolRequestsandexecuteToolCallsskip provider-executed calls, so a run that mixes web search with a client tool no longer parks on "Client tool web_search is ready to run" interrupts.- A
MESSAGES_SNAPSHOTandmodelMessagesToUIMessagesfold${id}-segment-${n}messages back into their parent, so the UI still shows one assistant message per response.
Without this, the turn after such a response fails with Anthropic's
thinking or redacted_thinking blocks in the latest assistant message cannot be modified. -
#1428
2d047c5- Forward summarize maxLength through OpenAI-compatible adapters using the token-limit key for their API, regardless of the summarize wrapper name. Keep explicit caller limits unchanged. -
#1471
74b5823- Keep a failed tool call's error on the tool messagechat()adds to its message history. Persisted threads now restore the call withstate: 'error'instead of'complete'. -
#1366
abb0169- Stop a mid-stream resume from duplicating the reasoning block. A hydrated message has nostepIdon its thinking part — the stored form has nowhere to keep one — so the reasoning replayed on rejoin, which is keyed bystepId, matched nothing and was appended, leaving the turn as thinking, text, thinking.updateThinkingPartnow falls back to the first thinking part that has nostepIdand adopts it, carrying its signature over so the provider's encrypted reasoning is not lost. Parts that already belong to another step are never adopted, so separate reasoning steps still get separate parts. -
#1427
ed87986- Structured output now reports a response that was cut off at the output cap (finish_reason: "length") as a truncation error instead of a JSON parse error or a "no content" / "missing structured result" error. This coverschat({ outputSchema })in native combined mode (error codemax_tokens),structuredOutputStream()inopenai-baseandai-openrouter(RUN_ERRORwith codemax_tokens), and their non-streamstructuredOutput(). A truncated document used to read as a schema failure; the error now says the token limit was reached.