Skip to content

Releases: TanStack/ai

@tanstack/solid-ai-devtools@1.0.2

Choose a tag to compare

@github-actions github-actions released this 04 Nov 14:00
Immutable release. Only release title and notes can be modified.
d82a6ed

Patch Changes

  • #1936 6ed7c64 - Cap the solid-js peer range at ^1. The previous open-ended >= range would accept Solid 2.0.0 once it is released, but these packages are built against Solid 1 and do not work with Solid 2.

@tanstack/openai-base@1.0.1

Choose a tag to compare

@github-actions github-actions released this 04 Nov 13:59
Immutable release. Only release title and notes can be modified.
d82a6ed

Patch Changes

  • #1966 e17cae7 - Stop the OpenAI Responses adapters from aborting a finished request. After response.completed the adapters stopped reading at once, so the OpenAI SDK aborted the request and a gateway such as Cloudflare AI Gateway logged a billed, complete call as a client cancel (499). The adapters now let the body end by itself for up to 250 ms and abort it only after that.

  • #1948 940c402 - Pass the full diff of a streamed apply_patch call to the app. The Responses API adds an apply_patch_call with status: "in_progress" and an empty diff, and streams the diff in before the item is done. The adapter ended the call when the item was added, so execute always got diff: "", and an agent loop sent empty patches until it hit its iteration limit. A user-run call (apply_patch, local_shell, shell, computer) now starts when its item is added and ends, with its input, once the item is no longer in progress, as function calls already do.

    If the response completes while a user-run call is still in progress, the run now ends with a RUN_ERROR (code incomplete-tool-call) instead of running the tool with incomplete input.

  • #1974 09dde65 - Report token usage for every call that the provider billed, also when the call fails.

    • Adapters put the usage that they received on RUN_ERROR: a cut-off response, a refusal, a parse failure, an empty response, or a stream that fails after usage arrived. Before, many of these paths dropped it.
    • A non-streaming structuredOutput(), image, or speech call that fails after the response throws an error with a usage field. chat(), generateImage(), generateSpeech(), and summarize() report it.
    • The onUsage middleware hook now also runs for a RUN_ERROR with usage. A structured output value that fails the schema check still reports the usage of its call.
    • Media streams carry usage on RUN_FINISHED and RUN_ERROR. Devtools now gets the summarize:usage and transcription:usage events, and text:usage for a chat RUN_ERROR with usage. A call that onModelError or a rate-limit retry drops still reports its usage.
    • Provider fields that were dropped are mapped: Anthropic thinking tokens, Claude Code total_cost_usd as usage.cost, OpenRouter Responses reasoning tokens, opencode cost and cache writes, ACP and Bedrock cache writes, OpenAI evaluate token details, Gemini Vertex embedding tokens, and audio duration as billed seconds for Whisper, Groq, Cloudflare, and Lovable transcription.
    • opencode adds up the usage of every agent step in a turn. Before, it counted only the last step.
    • Gemini Interactions usage (text, agentic video, and images) counts thought tokens in completionTokens, the same as generateContent.
  • Updated dependencies [9ac67f3, 9ac67f3, e17cae7, d6ead13, 450950d, 07d2e42, 13b1ca9, 09dde65]:

    • @tanstack/ai@1.1.0
    • @tanstack/ai-utils@1.0.1

@tanstack/ai@1.1.0

Choose a tag to compare

@github-actions github-actions released this 04 Nov 13:58
Immutable release. Only release title and notes can be modified.
d82a6ed

Minor Changes

  • #1977 9ac67f3 - New optional cancel options. Old calls work the same.

    • embed() takes abortSignal and timeout. The effective signal reaches the adapter as EmbeddingOptions.abortSignal.
    • getVideoJobStatus() takes abortSignal and timeout. The video adapter contract adds an optional { abortSignal } to getVideoStatus(jobId, options?) and getVideo(jobId, options?). The streaming generateVideo() poll passes its signal to both.
    • uploadFile(), getFile(), and deleteFile() take abortSignal. FilesAdapter.upload/get/delete take an optional { abortSignal }.
    • realtimeToken() takes abortSignal. RealtimeTokenAdapter.generateToken(options?) and RealtimeAdapter.connect(token, clientTools?, options?) take an optional { abortSignal }.
    • decide() and rerank() take timeout, and race the adapter call against the signal like the other activities.
    • GenerationMiddlewareContext has an optional signal: the effective activity signal.
  • #1977 9ac67f3 - New optional cancel hooks. Old code works the same.

    • MCPToolSource.tools() takes an optional signal. chat() passes the signal of its abortController to each MCP source during tool discovery.
    • VideoAdapter has an optional cancelVideoJob(jobId, options?) method. A streaming generateVideo() calls it (best effort) when its abortSignal or timeout aborts after the provider accepted the job. A failed cancel is logged and does not change the abort result.

Patch Changes

  • #1962 d6ead13 - Stop chat() from copying the whole assistant answer on every text chunk. A long reply streamed as small deltas no longer blocks the server for seconds.

  • #1968 450950d - Run client tools when a custom AG-UI server ends a run with finishReason: 'tool_calls' and closes the stream. Before, the client waited for a next run that never came, so the tool did not run and the agent loop stopped. The client now runs the unanswered calls when the stream ends. A tool that needs approval asks the user first, the same as for a success outcome.

  • #1979 07d2e42 - A cancel now stops the provider request, not only the caller. summarize() (also with stream: true, which now passes abortSignal and timeout to the adapter and reports a cancel to middleware onAbort, not onError), middleware ctx.abort() when the caller passed an abortController (adapter request, structured output, and ctx.signal), subagent children, generateVideo status polls, and aborted toWebSocket turns now stop when the run is cancelled.

  • #1903 13b1ca9 - Pass resolved and cancelled MCP input responses to pending server tools when resuming through persistence with an empty incoming message history.

  • #1974 09dde65 - Report token usage for every call that the provider billed, also when the call fails.

    • Adapters put the usage that they received on RUN_ERROR: a cut-off response, a refusal, a parse failure, an empty response, or a stream that fails after usage arrived. Before, many of these paths dropped it.
    • A non-streaming structuredOutput(), image, or speech call that fails after the response throws an error with a usage field. chat(), generateImage(), generateSpeech(), and summarize() report it.
    • The onUsage middleware hook now also runs for a RUN_ERROR with usage. A structured output value that fails the schema check still reports the usage of its call.
    • Media streams carry usage on RUN_FINISHED and RUN_ERROR. Devtools now gets the summarize:usage and transcription:usage events, and text:usage for a chat RUN_ERROR with usage. A call that onModelError or a rate-limit retry drops still reports its usage.
    • Provider fields that were dropped are mapped: Anthropic thinking tokens, Claude Code total_cost_usd as usage.cost, OpenRouter Responses reasoning tokens, opencode cost and cache writes, ACP and Bedrock cache writes, OpenAI evaluate token details, Gemini Vertex embedding tokens, and audio duration as billed seconds for Whisper, Groq, Cloudflare, and Lovable transcription.
    • opencode adds up the usage of every agent step in a turn. Before, it counted only the last step.
    • Gemini Interactions usage (text, agentic video, and images) counts thought tokens in completionTokens, the same as generateContent.
  • Updated dependencies [e17cae7, 09dde65]:

    • @tanstack/ai-utils@1.0.1
    • @tanstack/ai-event-client@1.0.1

@tanstack/ai-vercel-gateway@1.1.0

Choose a tag to compare

@github-actions github-actions released this 04 Nov 14:00
Immutable release. Only release title and notes can be modified.
d82a6ed

Minor Changes

  • #1977 9ac67f3 - Forward the new optional embedding abortSignal to the embeddings request.

Patch Changes

  • #1975 c7f8dfd - Aborting generateImage() now stops the Vercel AI Gateway request. Before, the call rejected but the request kept running and was billed.

  • #1931 7541699 - Report the gateway's debited amount (gatewayCost, which includes surcharges) as usage.cost instead of the inference charge alone.

  • Updated dependencies [9ac67f3, 9ac67f3, e17cae7, d6ead13, 450950d, 07d2e42, 13b1ca9, e17cae7, 940c402, 09dde65]:

    • @tanstack/ai@1.1.0
    • @tanstack/ai-utils@1.0.1
    • @tanstack/openai-base@1.0.1

@tanstack/ai-utils@1.0.1

Choose a tag to compare

@github-actions github-actions released this 04 Nov 14:00
Immutable release. Only release title and notes can be modified.
d82a6ed

Patch Changes

  • #1966 e17cae7 - Add drainAfterTerminal, which the OpenAI and OpenRouter Responses adapters use to let the body end by itself after a terminal event instead of cancelling a finished request.

@tanstack/ai-skills@1.0.1

Choose a tag to compare

@github-actions github-actions released this 04 Nov 14:00
Immutable release. Only release title and notes can be modified.
d82a6ed

Patch Changes

@tanstack/ai-sandbox-vercel@1.0.1

Choose a tag to compare

@github-actions github-actions released this 04 Nov 13:59
Immutable release. Only release title and notes can be modified.
d82a6ed

Patch Changes

  • #1976 5f62940 - create now stops a sandbox that comes after the signal aborted. Before, that sandbox kept running with no owner.

  • Updated dependencies [5f62940, 4caefd7, 4caefd7]:

    • @tanstack/ai-sandbox@1.1.0

@tanstack/ai-sandbox-sprites@1.1.0

Choose a tag to compare

@github-actions github-actions released this 04 Nov 13:59
Immutable release. Only release title and notes can be modified.
d82a6ed

Minor Changes

  • #1978 4caefd7 - snapshot(label, { signal }) passes the signal to the checkpoint request.

Patch Changes

@tanstack/ai-sandbox-e2b@1.1.0

Choose a tag to compare

@github-actions github-actions released this 04 Nov 13:59
Immutable release. Only release title and notes can be modified.
d82a6ed

Minor Changes

  • #1978 4caefd7 - snapshot(label, { signal }) and fork({ signal }) pass the signal to the E2B SDK, which aborts the request.

Patch Changes

@tanstack/ai-sandbox-docker@1.1.0

Choose a tag to compare

@github-actions github-actions released this 04 Nov 13:59
Immutable release. Only release title and notes can be modified.
d82a6ed

Minor Changes

  • #1978 4caefd7 - snapshot(label, { signal }), fork({ signal }), and ports.connect(port, { signal }) pass the signal to dockerode as abortSignal, which aborts the Docker API request.

Patch Changes