diff --git a/.changeset/abort-acp-question-elicitation.md b/.changeset/abort-acp-question-elicitation.md deleted file mode 100644 index 6c04ac4c19..0000000000 --- a/.changeset/abort-acp-question-elicitation.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-acp': patch ---- - -When a turn ends while the editor shows a question form (for example, another client answered it), the agent now sends `$/cancel_request` for that form. Before, the turn waited for the editor and did not report idle. diff --git a/.changeset/abort-cli-agent-tool-bridge-claude-code.md b/.changeset/abort-cli-agent-tool-bridge-claude-code.md deleted file mode 100644 index ce3098bbd6..0000000000 --- a/.changeset/abort-cli-agent-tool-bridge-claude-code.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-claude-code': patch ---- - -The host tool bridge now gets the run signal from `chat()`. Before, it read only `abortController`, which `chat()` does not set, so a stopped run did not abort the bridged tools. diff --git a/.changeset/abort-cli-agent-tool-bridge-codex.md b/.changeset/abort-cli-agent-tool-bridge-codex.md deleted file mode 100644 index c5664cae66..0000000000 --- a/.changeset/abort-cli-agent-tool-bridge-codex.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-codex': patch ---- - -The host tool bridge now gets the run signal from `chat()`. Before, it read only `abortController`, which `chat()` does not set, so a stopped run did not abort the bridged tools. diff --git a/.changeset/abort-cli-agent-tool-bridge-grok-build.md b/.changeset/abort-cli-agent-tool-bridge-grok-build.md deleted file mode 100644 index 95d420f0b4..0000000000 --- a/.changeset/abort-cli-agent-tool-bridge-grok-build.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-grok-build': patch ---- - -The host tool bridge of the `streaming-json` protocol now gets the run signal from `chat()`. Before, it read only `abortController`, which `chat()` does not set, so a stopped run did not abort the bridged tools. diff --git a/.changeset/abort-code-mode-run.md b/.changeset/abort-code-mode-run.md deleted file mode 100644 index c00508fe42..0000000000 --- a/.changeset/abort-code-mode-run.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-code-mode': patch ---- - -An abort of the run now ends the `execute_typescript` program: a call that waits for an approval stops, and the isolate is disposed. diff --git a/.changeset/abort-computer-use-actions.md b/.changeset/abort-computer-use-actions.md deleted file mode 100644 index b5a5263f9f..0000000000 --- a/.changeset/abort-computer-use-actions.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-computer-use': patch ---- - -An aborted computer action no longer runs when it waits in the queue. A `wait`, `hold_key`, a repeated key press, a `navigate`, or the next action of a batch now stops when the call aborts. Held keys are still released. A drag does not start after an abort. A drag that started goes to its end point, because a release in the middle drops the item at the wrong point. diff --git a/.changeset/abort-harness-exec-signal.md b/.changeset/abort-harness-exec-signal.md deleted file mode 100644 index eb967247af..0000000000 --- a/.changeset/abort-harness-exec-signal.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-harness': patch ---- - -The `list_files` and `grep` commands now get the abort signal of the tool call. `harnessText` now cancels the inner turn, or the remote turn, when the caller stops reading the stream early. diff --git a/.changeset/abort-mcp-task-cancel.md b/.changeset/abort-mcp-task-cancel.md deleted file mode 100644 index c28696b72e..0000000000 --- a/.changeset/abort-mcp-task-cancel.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-mcp': patch ---- - -`createMCPServer` now answers `tasks/cancel` for an `execution: 'task'` tool on spec 2025. The task status becomes `cancelled`, `ctx.abortSignal` of the tool aborts, and a late result does not replace the cancel. A spec 2025 `elicitation/create` that the server cancels now also stops the question in the harness. diff --git a/.changeset/abort-memory-hindsight-tools.md b/.changeset/abort-memory-hindsight-tools.md deleted file mode 100644 index bbf1b646e5..0000000000 --- a/.changeset/abort-memory-hindsight-tools.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-memory': minor ---- - -The `hindsight_retain`, `hindsight_recall`, and `hindsight_reflect` tools now give the abort signal of the call to the Hindsight client. diff --git a/.changeset/abort-sandbox-daytona-late-create.md b/.changeset/abort-sandbox-daytona-late-create.md deleted file mode 100644 index f74229f1eb..0000000000 --- a/.changeset/abort-sandbox-daytona-late-create.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-sandbox-daytona': patch ---- - -`create` and `restoreSnapshot` now delete a sandbox that the SDK makes after the signal aborted. Before, that sandbox kept running with no owner. diff --git a/.changeset/abort-sandbox-spawn-ndjson.md b/.changeset/abort-sandbox-spawn-ndjson.md deleted file mode 100644 index 1b65bc8d7f..0000000000 --- a/.changeset/abort-sandbox-spawn-ndjson.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-sandbox': patch ---- - -`spawnNdjson` now kills the agent process when the consumer stops reading early. The `save_sandbox_snapshot` tool now gives the abort signal of the call to `snapshots.save`. diff --git a/.changeset/abort-sandbox-vercel-late-create.md b/.changeset/abort-sandbox-vercel-late-create.md deleted file mode 100644 index 38062e76f5..0000000000 --- a/.changeset/abort-sandbox-vercel-late-create.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-sandbox-vercel': patch ---- - -`create` now stops a sandbox that comes after the signal aborted. Before, that sandbox kept running with no owner. diff --git a/.changeset/abort-signal-ai-bedrock.md b/.changeset/abort-signal-ai-bedrock.md deleted file mode 100644 index 92c9e38fdc..0000000000 --- a/.changeset/abort-signal-ai-bedrock.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-bedrock': patch ---- - -Aborting a chat now cancels the Converse request to Bedrock, for streaming and for structured output. Before, the request kept running. diff --git a/.changeset/abort-signal-ai-byteplus.md b/.changeset/abort-signal-ai-byteplus.md deleted file mode 100644 index 39d3c3a01f..0000000000 --- a/.changeset/abort-signal-ai-byteplus.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-byteplus': patch ---- - -Aborting an image, video, speech, or transcription call now cancels the BytePlus request. Before, the request kept running and was billed. The image and video requests still stop at the configured `timeout`. diff --git a/.changeset/abort-signal-ai-elevenlabs.md b/.changeset/abort-signal-ai-elevenlabs.md deleted file mode 100644 index 1336ec05e3..0000000000 --- a/.changeset/abort-signal-ai-elevenlabs.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-elevenlabs': patch ---- - -An abort now cancels the ElevenLabs request for speech, dialogue, music, sound effects, and transcription. Before, the adapters did not give the abort signal to the SDK, so the request ran to the end and was billed. diff --git a/.changeset/abort-signal-ai-fal.md b/.changeset/abort-signal-ai-fal.md deleted file mode 100644 index 8f305dca79..0000000000 --- a/.changeset/abort-signal-ai-fal.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-fal': patch ---- - -An abort now asks fal to cancel the job for image, audio, speech, and transcription. fal stops a queued job. For a job that already runs, the model app decides whether it stops. The speech audio download also stops on abort. diff --git a/.changeset/abort-signal-ai-gemini.md b/.changeset/abort-signal-ai-gemini.md deleted file mode 100644 index 1a2567b5cc..0000000000 --- a/.changeset/abort-signal-ai-gemini.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-gemini': patch ---- - -Aborting a call now cancels the Gemini request for Lyria audio, speech, Veo and Omni video creation, the Veo input image download, and chat with agentic video. Before, the request kept running and was billed. diff --git a/.changeset/abort-signal-ai-grok.md b/.changeset/abort-signal-ai-grok.md deleted file mode 100644 index 8cf0042328..0000000000 --- a/.changeset/abort-signal-ai-grok.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-grok': patch ---- - -Aborting `generateImage()`, `generateSpeech()`, `generateTranscription()` or `generateVideo()` now stops the xAI request. Before, the call rejected but the request kept running and was billed. diff --git a/.changeset/abort-signal-ai-groq.md b/.changeset/abort-signal-ai-groq.md deleted file mode 100644 index 4dbb0fb332..0000000000 --- a/.changeset/abort-signal-ai-groq.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-groq': patch ---- - -Aborting `generateSpeech()` or `generateTranscription()` now stops the Groq request. Before, the call rejected but the request kept running and was billed. diff --git a/.changeset/abort-signal-ai-mistral.md b/.changeset/abort-signal-ai-mistral.md deleted file mode 100644 index 04ab318e97..0000000000 --- a/.changeset/abort-signal-ai-mistral.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-mistral': patch ---- - -Aborting a chat now cancels the request to Mistral, for streaming and for structured output. Structured output keeps the `timeoutMs` limit when you pass a signal. diff --git a/.changeset/abort-signal-ai-ollama.md b/.changeset/abort-signal-ai-ollama.md deleted file mode 100644 index 90ef7ed195..0000000000 --- a/.changeset/abort-signal-ai-ollama.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-ollama': patch ---- - -Aborting a chat now stops the Ollama stream when you pass your own `Ollama` client. Structured output with your own client still runs to the end, because `ollama` has no per-call signal. diff --git a/.changeset/abort-signal-ai-openai.md b/.changeset/abort-signal-ai-openai.md deleted file mode 100644 index c546c8097e..0000000000 --- a/.changeset/abort-signal-ai-openai.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-openai': patch ---- - -Aborting `generateImage()`, `generateSpeech()`, `generateTranscription()` or `generateVideo()` now stops the OpenAI request. Before, the call rejected but the request kept running and was billed. This also covers the image fetch for an `allowUrlFetch` image input. diff --git a/.changeset/abort-signal-ai-openrouter.md b/.changeset/abort-signal-ai-openrouter.md deleted file mode 100644 index d2e04b01c3..0000000000 --- a/.changeset/abort-signal-ai-openrouter.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-openrouter': patch ---- - -Aborting an image or video call now cancels the OpenRouter request. Before, the request kept running and was billed. diff --git a/.changeset/abort-signal-ai-vercel-gateway.md b/.changeset/abort-signal-ai-vercel-gateway.md deleted file mode 100644 index c8a16447f1..0000000000 --- a/.changeset/abort-signal-ai-vercel-gateway.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-vercel-gateway': patch ---- - -Aborting `generateImage()` now stops the Vercel AI Gateway request. Before, the call rejected but the request kept running and was billed. diff --git a/.changeset/ai-abort-signal-options.md b/.changeset/ai-abort-signal-options.md deleted file mode 100644 index aea95be939..0000000000 --- a/.changeset/ai-abort-signal-options.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -'@tanstack/ai': minor ---- - -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. diff --git a/.changeset/ai-anthropic-abort-signal-options.md b/.changeset/ai-anthropic-abort-signal-options.md deleted file mode 100644 index 5c3eb0ef43..0000000000 --- a/.changeset/ai-anthropic-abort-signal-options.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-anthropic': minor ---- - -Forward the new optional `abortSignal` of the files adapter to `upload`, `get`, and `delete`. diff --git a/.changeset/ai-bedrock-abort-signal-options.md b/.changeset/ai-bedrock-abort-signal-options.md deleted file mode 100644 index 7b2a7b39ca..0000000000 --- a/.changeset/ai-bedrock-abort-signal-options.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-bedrock': minor ---- - -Forward the new optional embedding `abortSignal` to each `InvokeModel` call. diff --git a/.changeset/ai-byteplus-abort-signal-options.md b/.changeset/ai-byteplus-abort-signal-options.md deleted file mode 100644 index 5847552a95..0000000000 --- a/.changeset/ai-byteplus-abort-signal-options.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-byteplus': minor ---- - -Forward the new optional `abortSignal` of `getVideoStatus` and `getVideo` to the task lookup. A caller signal now works together with the config `timeout`. diff --git a/.changeset/ai-byteplus-cancel-video-job.md b/.changeset/ai-byteplus-cancel-video-job.md deleted file mode 100644 index 9d7e1fedbd..0000000000 --- a/.changeset/ai-byteplus-cancel-video-job.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-byteplus': minor ---- - -`byteplusVideo` implements the optional `cancelVideoJob(jobId, options?)` with `DELETE /contents/generations/tasks/{id}`. Ark cancels only a queued task. A streaming `generateVideo()` calls it when the caller aborts. diff --git a/.changeset/ai-cancel-video-job-mcp-signal.md b/.changeset/ai-cancel-video-job-mcp-signal.md deleted file mode 100644 index 3215ac74fc..0000000000 --- a/.changeset/ai-cancel-video-job-mcp-signal.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@tanstack/ai': minor ---- - -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. diff --git a/.changeset/ai-client-abort-signal-agents.md b/.changeset/ai-client-abort-signal-agents.md deleted file mode 100644 index f3cac932b8..0000000000 --- a/.changeset/ai-client-abort-signal-agents.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-client': minor ---- - -`createMcpAppBridge().callTool(input, { signal })` passes the signal to the call request. diff --git a/.changeset/ai-client-abort-signal-options.md b/.changeset/ai-client-abort-signal-options.md deleted file mode 100644 index 1693d89808..0000000000 --- a/.changeset/ai-client-abort-signal-options.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-client': minor ---- - -A client tool now gets `abortSignal` in its execute context. It aborts when you call `stop()` on the `ChatClient`. diff --git a/.changeset/ai-client-cancel-url-connect-signal.md b/.changeset/ai-client-cancel-url-connect-signal.md deleted file mode 100644 index 5917a7f0f0..0000000000 --- a/.changeset/ai-client-cancel-url-connect-signal.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@tanstack/ai-client': minor ---- - -New optional cancel features. Old code works the same. - -- `fetchServerSentEvents` and `fetchHttpStream` take an optional `cancelUrl`. With it, `ChatClient.stop()` sends `POST cancelUrl` with `{ runId, threadId }`, so the server can cancel a durable run. Only `stop()` sends it, not an unmount or a reload. -- Connection adapters can have an optional `cancelRun({ runId, threadId })` method. `stop()` calls it. -- `RealtimeClient` passes an `abortSignal` to `adapter.connect()`. A `disconnect()` during `connect()` aborts the setup, and the status goes to `idle`, not `error`. diff --git a/.changeset/ai-cloudflare-abort-signal-options.md b/.changeset/ai-cloudflare-abort-signal-options.md deleted file mode 100644 index 88f7da8305..0000000000 --- a/.changeset/ai-cloudflare-abort-signal-options.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-cloudflare': minor ---- - -Forward the new optional embedding `abortSignal` to the Workers AI REST request. diff --git a/.changeset/ai-code-mode-abort-signal-agents.md b/.changeset/ai-code-mode-abort-signal-agents.md deleted file mode 100644 index fad03dddda..0000000000 --- a/.changeset/ai-code-mode-abort-signal-agents.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-code-mode': minor ---- - -`IsolateContext.execute(code, options?)` takes an optional `{ signal }`. `execute_typescript` passes the abort signal of the tool call, so a driver can stop the run. diff --git a/.changeset/ai-cohere-abort-signal-options.md b/.changeset/ai-cohere-abort-signal-options.md deleted file mode 100644 index 21eefb8107..0000000000 --- a/.changeset/ai-cohere-abort-signal-options.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-cohere': minor ---- - -Forward the new optional embedding `abortSignal` to the embed request and to an image URL download. diff --git a/.changeset/ai-cohere-embed-batch.md b/.changeset/ai-cohere-embed-batch.md deleted file mode 100644 index fba4ec67e0..0000000000 --- a/.changeset/ai-cohere-embed-batch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-cohere': patch ---- - -`embed()` with the Cohere adapter no longer fails with a 400 when given more than 96 inputs. The adapter now splits the input into requests of at most 96 (the `v2/embed` per-request limit) and returns the vectors in input order, with token usage summed across requests. diff --git a/.changeset/ai-computer-playwright-action-signal.md b/.changeset/ai-computer-playwright-action-signal.md deleted file mode 100644 index c020ba3e07..0000000000 --- a/.changeset/ai-computer-playwright-action-signal.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-computer-playwright': minor ---- - -`screenshot`, `zoom`, and `navigate` reject when their signal aborts. Playwright takes no signal, so the page call continues in the background. The factory closes the new browser context when `create` aborts during the start URL. diff --git a/.changeset/ai-computer-sandbox-abort-signal-agents.md b/.changeset/ai-computer-sandbox-abort-signal-agents.md deleted file mode 100644 index 388770ac59..0000000000 --- a/.changeset/ai-computer-sandbox-abort-signal-agents.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-computer-sandbox': minor ---- - -Pass the `create()` signal to `provider.create()`. diff --git a/.changeset/ai-computer-sandbox-action-signal.md b/.changeset/ai-computer-sandbox-action-signal.md deleted file mode 100644 index 5180794293..0000000000 --- a/.changeset/ai-computer-sandbox-action-signal.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-computer-sandbox': minor ---- - -The driver passes the signal of each action to `sandbox.process.exec`, so an abort stops the xdotool or screenshot command. `createSandboxComputerDriver({ signal })` stops the setup commands, and `sandboxComputer` passes the `create` signal to it. diff --git a/.changeset/ai-computer-use-abort-signal-agents.md b/.changeset/ai-computer-use-abort-signal-agents.md deleted file mode 100644 index 8097a358a7..0000000000 --- a/.changeset/ai-computer-use-abort-signal-agents.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-computer-use': minor ---- - -`ComputerDriverFactory.create({ threadId, signal })` gets the abort signal of the tool call that needs the machine. diff --git a/.changeset/ai-computer-use-action-signal.md b/.changeset/ai-computer-use-action-signal.md deleted file mode 100644 index 1c7882f347..0000000000 --- a/.changeset/ai-computer-use-action-signal.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-computer-use': minor ---- - -Each `ComputerDriver` action takes an optional `signal`, for example `move(x, y, { signal })` and `click(x, y, { button, count, signal })`. The computer tools pass the abort signal of the tool call to each action. An abort also stops the `wait` and `hold_key` waits and the wait before the screenshot. `keyUp` and `mouseUp` get no signal, so held keys and buttons are released after an abort. diff --git a/.changeset/ai-elevenlabs-abort-signal-options.md b/.changeset/ai-elevenlabs-abort-signal-options.md deleted file mode 100644 index ea76a48ea7..0000000000 --- a/.changeset/ai-elevenlabs-abort-signal-options.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-elevenlabs': minor ---- - -Forward the new optional `abortSignal` of `generateToken()` to the signed URL request. diff --git a/.changeset/ai-fal-abort-signal-options.md b/.changeset/ai-fal-abort-signal-options.md deleted file mode 100644 index da32b1ec45..0000000000 --- a/.changeset/ai-fal-abort-signal-options.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-fal': minor ---- - -Forward the new optional `abortSignal` of `getVideoStatus` and `getVideo` to `fal.queue.status` and `fal.queue.result`. diff --git a/.changeset/ai-fal-cancel-video-job.md b/.changeset/ai-fal-cancel-video-job.md deleted file mode 100644 index a9bfdbee61..0000000000 --- a/.changeset/ai-fal-cancel-video-job.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-fal': minor ---- - -`falVideo` implements the optional `cancelVideoJob(jobId, options?)` with `fal.queue.cancel`. A streaming `generateVideo()` calls it when the caller aborts. diff --git a/.changeset/ai-gemini-abort-signal-options.md b/.changeset/ai-gemini-abort-signal-options.md deleted file mode 100644 index 12a3860069..0000000000 --- a/.changeset/ai-gemini-abort-signal-options.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-gemini': minor ---- - -Forward the new optional `abortSignal` in embeddings, Veo and Omni video status and download, files `get` and `delete`, and the realtime token request. `uploadGeminiFile()` takes `abortSignal`: it cancels the status requests and the wait between polls. diff --git a/.changeset/ai-grok-abort-signal-options.md b/.changeset/ai-grok-abort-signal-options.md deleted file mode 100644 index b4c8802f9f..0000000000 --- a/.changeset/ai-grok-abort-signal-options.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-grok': minor ---- - -Forward the new optional `abortSignal` in video status and download, files upload/get/delete, the realtime token request, and the realtime WebRTC SDP request. diff --git a/.changeset/ai-harness-abort-signal-agents.md b/.changeset/ai-harness-abort-signal-agents.md deleted file mode 100644 index 9e5e244c35..0000000000 --- a/.changeset/ai-harness-abort-signal-agents.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-harness': minor ---- - -Each request method of `createHarnessClient` takes an optional last argument `{ signal }`: the control inputs, `snapshot`, `transcript`, `agentTranscript`, `describe`, `putMedia`, `mediaUrl`, `loadMedia`, and `sessions.*`. diff --git a/.changeset/ai-isolate-cloudflare-abort-signal-agents.md b/.changeset/ai-isolate-cloudflare-abort-signal-agents.md deleted file mode 100644 index 4f3c13857e..0000000000 --- a/.changeset/ai-isolate-cloudflare-abort-signal-agents.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-isolate-cloudflare': minor ---- - -Forward the `execute()` signal to the worker request. diff --git a/.changeset/ai-isolate-daytona-abort-signal.md b/.changeset/ai-isolate-daytona-abort-signal.md deleted file mode 100644 index 8375979580..0000000000 --- a/.changeset/ai-isolate-daytona-abort-signal.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-isolate-daytona': minor ---- - -When the `execute()` signal aborts, `execute()` returns an `AbortError` failure and starts no more tool rounds. The Daytona SDK cannot cancel a `codeRun`, so a run that already started continues in the sandbox until its own timeout. diff --git a/.changeset/ai-isolate-e2b-abort-signal-agents.md b/.changeset/ai-isolate-e2b-abort-signal-agents.md deleted file mode 100644 index 81de234349..0000000000 --- a/.changeset/ai-isolate-e2b-abort-signal-agents.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-isolate-e2b': minor ---- - -Kill the sandbox process group when the `execute()` signal aborts. The run returns an `AbortError` failure. diff --git a/.changeset/ai-isolate-node-abort-signal-agents.md b/.changeset/ai-isolate-node-abort-signal-agents.md deleted file mode 100644 index 9c8c84b763..0000000000 --- a/.changeset/ai-isolate-node-abort-signal-agents.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-isolate-node': minor ---- - -Stop a running script when the `execute()` signal aborts. The run returns an `AbortError` failure. diff --git a/.changeset/ai-isolate-quickjs-abort-signal.md b/.changeset/ai-isolate-quickjs-abort-signal.md deleted file mode 100644 index 242236aec3..0000000000 --- a/.changeset/ai-isolate-quickjs-abort-signal.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-isolate-quickjs': minor ---- - -Stop a run when the `execute()` signal aborts. The run returns an `AbortError` failure, and the context is disposed, the same as after a timeout. diff --git a/.changeset/ai-isolate-quickjs-bun-abort-signal.md b/.changeset/ai-isolate-quickjs-bun-abort-signal.md deleted file mode 100644 index 077161443a..0000000000 --- a/.changeset/ai-isolate-quickjs-bun-abort-signal.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-isolate-quickjs-bun': minor ---- - -Stop a run when the `execute()` signal aborts. The run returns an `AbortError` failure. The context stays usable. diff --git a/.changeset/ai-lovable-abort-signal-options.md b/.changeset/ai-lovable-abort-signal-options.md deleted file mode 100644 index 3a186651e7..0000000000 --- a/.changeset/ai-lovable-abort-signal-options.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-lovable': minor ---- - -Forward the new optional `abortSignal` in embeddings and in video status and download. diff --git a/.changeset/ai-mcp-abort-signal-agents.md b/.changeset/ai-mcp-abort-signal-agents.md deleted file mode 100644 index f60b8cb9d3..0000000000 --- a/.changeset/ai-mcp-abort-signal-agents.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -'@tanstack/ai-mcp': minor ---- - -New optional signals. Old calls work the same. - -- `createMCPClient({ signal })` cancels the connect handshake. -- `tools({ signal })`, `resources({ signal })`, `readResource(uri, { signal })`, `resourceTemplates({ signal })`, `prompts({ signal })`, and `getPrompt(name, args, { signal })` send the signal to the MCP SDK. -- The lazy tool list in `callTool` uses the signal of the call. -- The handler from `createMcpAppCallHandler` takes `(req, { signal })` and passes it to the connect, the tool list, and the tool call. diff --git a/.changeset/ai-mcp-stdio-concurrent-requests.md b/.changeset/ai-mcp-stdio-concurrent-requests.md deleted file mode 100644 index 29b7a2053e..0000000000 --- a/.changeset/ai-mcp-stdio-concurrent-requests.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-mcp': patch ---- - -`serveMCPStdio` no longer holds a request behind a running request. A `ping` or a fast tool call sent during a slow tool call now gets its answer at once. Requests still wait for an `initialize` that is in flight, because it sets the session id. diff --git a/.changeset/ai-memory-abort-signal-agents.md b/.changeset/ai-memory-abort-signal-agents.md deleted file mode 100644 index 2975acbc5c..0000000000 --- a/.changeset/ai-memory-abort-signal-agents.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-memory': minor ---- - -`MemoryAdapter.recall(scope, query, { signal })` and `Embedder.embed(text, { signal })` take an optional signal. `memoryMiddleware` passes the chat run signal. `inMemory()`, `redis()`, and `mem0()` forward it. diff --git a/.changeset/ai-memory-provider-recall-signal.md b/.changeset/ai-memory-provider-recall-signal.md deleted file mode 100644 index 95dd4a9f96..0000000000 --- a/.changeset/ai-memory-provider-recall-signal.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-memory': minor ---- - -The Hindsight adapter passes the `recall()` signal to `client.recall`. The Honcho adapter stops waiting when the signal aborts. The Honcho SDK takes no signal, so its request continues in the background. diff --git a/.changeset/ai-mistral-abort-signal-options.md b/.changeset/ai-mistral-abort-signal-options.md deleted file mode 100644 index ee09c68d31..0000000000 --- a/.changeset/ai-mistral-abort-signal-options.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-mistral': minor ---- - -Forward the new optional embedding `abortSignal` to the embeddings request. diff --git a/.changeset/ai-neon-abort-signal-options.md b/.changeset/ai-neon-abort-signal-options.md deleted file mode 100644 index fcbf72ef8a..0000000000 --- a/.changeset/ai-neon-abort-signal-options.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-neon': minor ---- - -Forward the new optional embedding `abortSignal` to the embeddings request. diff --git a/.changeset/ai-ollama-abort-signal-options.md b/.changeset/ai-ollama-abort-signal-options.md deleted file mode 100644 index 8bf513963a..0000000000 --- a/.changeset/ai-ollama-abort-signal-options.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-ollama': minor ---- - -Forward the new optional embedding `abortSignal` to the embed request. An injected `Ollama` client cannot take a per-call signal, so `embed()` only rejects on abort for it. diff --git a/.changeset/ai-openai-abort-signal-options.md b/.changeset/ai-openai-abort-signal-options.md deleted file mode 100644 index aa7efb1671..0000000000 --- a/.changeset/ai-openai-abort-signal-options.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-openai': minor ---- - -Forward the new optional `abortSignal` to the provider request in embeddings, video status and download, files upload/get/delete, the realtime token request, and the realtime WebRTC SDP request. diff --git a/.changeset/ai-openrouter-abort-signal-options.md b/.changeset/ai-openrouter-abort-signal-options.md deleted file mode 100644 index 5484647132..0000000000 --- a/.changeset/ai-openrouter-abort-signal-options.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-openrouter': minor ---- - -Forward the new optional `abortSignal` of `getVideoStatus` and `getVideo` to the generation lookup and the content download. diff --git a/.changeset/ai-sandbox-abort-signal-agents.md b/.changeset/ai-sandbox-abort-signal-agents.md deleted file mode 100644 index 6c0053c899..0000000000 --- a/.changeset/ai-sandbox-abort-signal-agents.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-sandbox': minor ---- - -New optional signals on the sandbox contract: `git.clone({ signal })`, `git.push(dir, { signal })`, `git.pull(dir, { signal })`, `snapshot(label, { signal })`, `fork({ signal })`, and `ports.connect(port, { signal })`. The exec-backed git passes the signal to each git command. diff --git a/.changeset/ai-sandbox-blaxel-abort-signal-agents.md b/.changeset/ai-sandbox-blaxel-abort-signal-agents.md deleted file mode 100644 index 4dbf765c4e..0000000000 --- a/.changeset/ai-sandbox-blaxel-abort-signal-agents.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-sandbox-blaxel': minor ---- - -Pass the `git.push` and `git.pull` signal to the git command. diff --git a/.changeset/ai-sandbox-boxd-k11-signal.md b/.changeset/ai-sandbox-boxd-k11-signal.md deleted file mode 100644 index aa39005b08..0000000000 --- a/.changeset/ai-sandbox-boxd-k11-signal.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-sandbox-boxd': minor ---- - -When the `snapshot` signal aborts, `snapshot` stops polling for the capture. When the `fork` signal aborts, `fork` stops waiting for the new machine and deletes it. The boxd SDK takes no signal, so a started capture continues in boxd. diff --git a/.changeset/ai-sandbox-docker-k11-signal.md b/.changeset/ai-sandbox-docker-k11-signal.md deleted file mode 100644 index baf7ff2b4e..0000000000 --- a/.changeset/ai-sandbox-docker-k11-signal.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-sandbox-docker': minor ---- - -`snapshot(label, { signal })`, `fork({ signal })`, and `ports.connect(port, { signal })` pass the signal to dockerode as `abortSignal`, which aborts the Docker API request. diff --git a/.changeset/ai-sandbox-e2b-k11-signal.md b/.changeset/ai-sandbox-e2b-k11-signal.md deleted file mode 100644 index 34f9caf8ac..0000000000 --- a/.changeset/ai-sandbox-e2b-k11-signal.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-sandbox-e2b': minor ---- - -`snapshot(label, { signal })` and `fork({ signal })` pass the signal to the E2B SDK, which aborts the request. diff --git a/.changeset/ai-sandbox-sprites-k11-signal.md b/.changeset/ai-sandbox-sprites-k11-signal.md deleted file mode 100644 index 50443f5f67..0000000000 --- a/.changeset/ai-sandbox-sprites-k11-signal.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-sandbox-sprites': minor ---- - -`snapshot(label, { signal })` passes the signal to the checkpoint request. diff --git a/.changeset/ai-sandbox-tool-bridge-call-signal.md b/.changeset/ai-sandbox-tool-bridge-call-signal.md deleted file mode 100644 index 4fca7e55e6..0000000000 --- a/.changeset/ai-sandbox-tool-bridge-call-signal.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-sandbox': minor ---- - -`ToolBridgeCore.callTool(name, args, { signal })` takes an optional signal for one call. The tool gets a signal that aborts when this signal or the bridge `signal` aborts. The host MCP bridge passes the request signal, so a closed `tools/call` request stops the bridged tool. diff --git a/.changeset/ai-utils-drain-after-terminal.md b/.changeset/ai-utils-drain-after-terminal.md deleted file mode 100644 index da6ce20cd3..0000000000 --- a/.changeset/ai-utils-drain-after-terminal.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-utils': patch ---- - -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. diff --git a/.changeset/ai-vercel-gateway-abort-signal-options.md b/.changeset/ai-vercel-gateway-abort-signal-options.md deleted file mode 100644 index a5abaa0cf4..0000000000 --- a/.changeset/ai-vercel-gateway-abort-signal-options.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-vercel-gateway': minor ---- - -Forward the new optional embedding `abortSignal` to the embeddings request. diff --git a/.changeset/chat-text-accumulation.md b/.changeset/chat-text-accumulation.md deleted file mode 100644 index 4525b72c26..0000000000 --- a/.changeset/chat-text-accumulation.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai': patch ---- - -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. diff --git a/.changeset/client-abort-reaches-request.md b/.changeset/client-abort-reaches-request.md deleted file mode 100644 index 43e466f904..0000000000 --- a/.changeset/client-abort-reaches-request.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-client': patch ---- - -`stop()` no longer waits for a client tool that never settles. Fetch and XHR connection adapters now abort on the client's signal and on your own `options.signal`. `stream()` and `rpcStream()` end on abort even if the source ignores the signal. `RealtimeClient.disconnect()` during `connect()` or a token refresh no longer leaves a connection or a token refresh timer behind. diff --git a/.changeset/client-cancel-like-stop.md b/.changeset/client-cancel-like-stop.md deleted file mode 100644 index a02c24fa38..0000000000 --- a/.changeset/client-cancel-like-stop.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-client': patch ---- - -A cancel now stops the request. `stop()` and an abort of the connection `options.signal` reach the fetch, XHR, `stream()`, and `rpcStream()` requests. A realtime `disconnect()` during `connect()` does not stop a pending `getToken()` or `adapter.connect()` call: it drops the late result and closes the connection that comes back. An abort of `options.signal` now ends the chat like `stop()`, not as a finished run. A realtime connection that a later `connect()` replaced no longer changes the status of the live session. diff --git a/.changeset/client-tool-local-approval.md b/.changeset/client-tool-local-approval.md deleted file mode 100644 index 97e3caccb0..0000000000 --- a/.changeset/client-tool-local-approval.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-client': patch ---- - -Ask for approval of a `needsApproval` client tool when the server does not ask for it, for example a custom AG-UI server or a connection adapter with no TanStack server. Before, the client logged a warning and the tool never ran. Now the call comes in `interrupts` as a `tool-approval` item, the same as with `chat()`. On approve, the client runs the tool and continues the loop. On deny, it sends a denied result and continues. diff --git a/.changeset/client-tool-tool-calls-finish.md b/.changeset/client-tool-tool-calls-finish.md deleted file mode 100644 index 38eaee4943..0000000000 --- a/.changeset/client-tool-tool-calls-finish.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@tanstack/ai': patch -'@tanstack/ai-client': patch ---- - -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. diff --git a/.changeset/core-abort-reaches-provider.md b/.changeset/core-abort-reaches-provider.md deleted file mode 100644 index a0b066ba8e..0000000000 --- a/.changeset/core-abort-reaches-provider.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai': patch ---- - -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. diff --git a/.changeset/daytona-stdin-eof.md b/.changeset/daytona-stdin-eof.md deleted file mode 100644 index 2ada6d8926..0000000000 --- a/.changeset/daytona-stdin-eof.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-sandbox-daytona': patch ---- - -Daytona now reports `writableStdin: false`. The session API cannot close a command's stdin, so `stdin.end()` never sent EOF and stdin-fed harnesses (Claude Code, Codex) hung forever. They now get the prompt from a file redirect instead. diff --git a/.changeset/durable-mcp-input-response.md b/.changeset/durable-mcp-input-response.md deleted file mode 100644 index cd8945a171..0000000000 --- a/.changeset/durable-mcp-input-response.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai': patch ---- - -Pass resolved and cancelled MCP input responses to pending server tools when resuming through persistence with an empty incoming message history. diff --git a/.changeset/gemini-completion-tokens-include-thoughts.md b/.changeset/gemini-completion-tokens-include-thoughts.md deleted file mode 100644 index e94b86b22c..0000000000 --- a/.changeset/gemini-completion-tokens-include-thoughts.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-gemini': patch ---- - -Count thinking tokens in `completionTokens`. Gemini reports `thoughtsTokenCount` separately from `candidatesTokenCount` but bills both as output, so `completionTokens` was lower than `totalTokens - promptTokens` for thinking models. `completionTokensDetails.reasoningTokens` is unchanged. diff --git a/.changeset/gemini-image-store-false.md b/.changeset/gemini-image-store-false.md deleted file mode 100644 index 53c11080da..0000000000 --- a/.changeset/gemini-image-store-false.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-gemini': patch ---- - -Native Gemini image generation no longer throws `image interaction returned no id.` when `modelOptions.store` is `false`. Gemini leaves the interaction id out of an unstored interaction, so the result gets a local id, which cannot be passed as `previous_interaction_id`. A stored interaction without an id still throws. diff --git a/.changeset/mistral-parallel-tool-calls-index.md b/.changeset/mistral-parallel-tool-calls-index.md deleted file mode 100644 index 6397163ca7..0000000000 --- a/.changeset/mistral-parallel-tool-calls-index.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-mistral': patch ---- - -Parallel tool calls that arrive whole with the same `index` (the Mistral SDK fills a missing `index` with 0) are no longer merged into one call with a combined name and invalid JSON arguments. A tool call delta whose id differs from the one already in its slot now starts a new call. diff --git a/.changeset/ollama-parallel-tool-call-ids.md b/.changeset/ollama-parallel-tool-call-ids.md deleted file mode 100644 index 4e19f02cc7..0000000000 --- a/.changeset/ollama-parallel-tool-call-ids.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-ollama': patch ---- - -Keep parallel calls to the same tool apart when Ollama sends no tool-call id. The fallback id was `_`, so two calls to one tool in the same millisecond shared an id and the second call was merged into the first instead of running. The fallback id is now unique per call. diff --git a/.changeset/openai-base-drain-after-completed.md b/.changeset/openai-base-drain-after-completed.md deleted file mode 100644 index ae01918ff6..0000000000 --- a/.changeset/openai-base-drain-after-completed.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/openai-base': patch ---- - -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. diff --git a/.changeset/openai-streamed-apply-patch-diff.md b/.changeset/openai-streamed-apply-patch-diff.md deleted file mode 100644 index 2e9148398e..0000000000 --- a/.changeset/openai-streamed-apply-patch-diff.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@tanstack/openai-base': patch ---- - -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. diff --git a/.changeset/openrouter-drain-after-completed.md b/.changeset/openrouter-drain-after-completed.md deleted file mode 100644 index 7b2e2bb007..0000000000 --- a/.changeset/openrouter-drain-after-completed.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-openrouter': patch ---- - -Stop the OpenRouter Responses adapter from cancelling a finished request. After `response.completed` the adapter stopped reading at once, which cancelled the SDK's event stream and the fetch body, so a gateway such as Cloudflare AI Gateway logged a billed, complete call as a client cancel (499). The adapter now lets the body end by itself for up to 250 ms and cancels it only after that. diff --git a/.changeset/queue-waits-for-interrupts.md b/.changeset/queue-waits-for-interrupts.md deleted file mode 100644 index 6744236f2b..0000000000 --- a/.changeset/queue-waits-for-interrupts.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-client': patch ---- - -Keep queued messages in the queue while a run is paused on an interrupt, for example a tool approval. Before, the queue sent the next message as soon as the paused run ended, so a new run started while the tool call was still unanswered. Now the queue sends after the run that answers the interrupt ends with success. diff --git a/.changeset/readme-fix-generate-imports.md b/.changeset/readme-fix-generate-imports.md deleted file mode 100644 index eedee3d928..0000000000 --- a/.changeset/readme-fix-generate-imports.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@tanstack/ai-groq': patch -'@tanstack/ai-grok': patch -'@tanstack/ai-mistral': patch ---- - -Fix the README usage examples: they imported `generate` (and `generateImages` for Grok) from `@tanstack/ai`, which do not exist. They now use `chat({ stream: false })` and `generateImage`. diff --git a/.changeset/solid-js-peer-cap.md b/.changeset/solid-js-peer-cap.md deleted file mode 100644 index ba406d101a..0000000000 --- a/.changeset/solid-js-peer-cap.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@tanstack/ai-solid': patch -'@tanstack/solid-ai-devtools': patch ---- - -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. diff --git a/.changeset/usage-on-every-path.md b/.changeset/usage-on-every-path.md deleted file mode 100644 index d84a5eacec..0000000000 --- a/.changeset/usage-on-every-path.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -'@tanstack/ai': patch -'@tanstack/ai-event-client': patch -'@tanstack/openai-base': patch -'@tanstack/ai-openai': patch -'@tanstack/ai-openrouter': patch -'@tanstack/ai-anthropic': patch -'@tanstack/ai-bedrock': patch -'@tanstack/ai-gemini': patch -'@tanstack/ai-mistral': patch -'@tanstack/ai-ollama': patch -'@tanstack/ai-groq': patch -'@tanstack/ai-cloudflare': patch -'@tanstack/ai-lovable': patch -'@tanstack/ai-claude-code': patch -'@tanstack/ai-codex': patch -'@tanstack/ai-opencode': patch -'@tanstack/ai-acp': patch -'@tanstack/ai-grok-build': patch -'@tanstack/ai-harness': patch ---- - -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`. diff --git a/.changeset/use-chat-hidden-activity.md b/.changeset/use-chat-hidden-activity.md deleted file mode 100644 index c024f62e61..0000000000 --- a/.changeset/use-chat-hidden-activity.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-react': patch ---- - -`useChat` keeps working in a view hidden by React's ``. Hiding runs the hook's effect cleanups, and the deferred teardown disposed the client while React kept the hook, so the view came back with a dead client: a reply in flight never resumed and the thread did not load again. When the view shows again, `useChat` now replaces the disposed client with a new one that starts from the messages on screen, loads the thread and rejoins its run. diff --git a/.changeset/vercel-gateway-surcharge-cost.md b/.changeset/vercel-gateway-surcharge-cost.md deleted file mode 100644 index 7df46ac3b6..0000000000 --- a/.changeset/vercel-gateway-surcharge-cost.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@tanstack/ai-vercel-gateway': patch ---- - -Report the gateway's debited amount (`gatewayCost`, which includes surcharges) as `usage.cost` instead of the inference charge alone. diff --git a/examples/ag-ui/CHANGELOG.md b/examples/ag-ui/CHANGELOG.md index fc25f99ff5..b54134739e 100644 --- a/examples/ag-ui/CHANGELOG.md +++ b/examples/ag-ui/CHANGELOG.md @@ -1,5 +1,13 @@ # ag-ui +## 0.0.43 + +### Patch Changes + +- Updated dependencies [[`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`1e13e87`](https://github.com/TanStack/ai/commit/1e13e87b26ccd2734455fc4a958c0690ef3ead06), [`450950d`](https://github.com/TanStack/ai/commit/450950da860d58047c654c1497ddb48d651f9076), [`f33f72a`](https://github.com/TanStack/ai/commit/f33f72ab6da9a0f95bd912e29d2cabc2eab17f27), [`68d0b60`](https://github.com/TanStack/ai/commit/68d0b60d53fa39c2f41f3bcd0548e84c982f37cd)]: + - @tanstack/ai-client@1.1.0 + - @tanstack/ai-react@1.0.2 + ## 0.0.42 ### Patch Changes diff --git a/examples/ag-ui/package.json b/examples/ag-ui/package.json index b71dd5d06a..2540271140 100644 --- a/examples/ag-ui/package.json +++ b/examples/ag-ui/package.json @@ -2,7 +2,7 @@ "name": "ag-ui", "private": true, "type": "module", - "version": "0.0.42", + "version": "0.0.43", "scripts": { "detect-servers": "node scripts/detect-servers.mjs", "predev": "node scripts/detect-servers.mjs", diff --git a/packages/ai-acp/CHANGELOG.md b/packages/ai-acp/CHANGELOG.md index c595a95636..b48aaf104d 100644 --- a/packages/ai-acp/CHANGELOG.md +++ b/packages/ai-acp/CHANGELOG.md @@ -1,5 +1,25 @@ # @tanstack/ai-acp +## 1.0.1 + +### Patch Changes + +- [#1976](https://github.com/TanStack/ai/pull/1976) [`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960) - When a turn ends while the editor shows a question form (for example, another client answered it), the agent now sends `$/cancel_request` for that form. Before, the turn waited for the editor and did not report idle. + +- [#1974](https://github.com/TanStack/ai/pull/1974) [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb) - 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 [[`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960), [`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32), [`d6ead13`](https://github.com/TanStack/ai/commit/d6ead13def85f91782e20d6c1b8755fdf1c836c2), [`450950d`](https://github.com/TanStack/ai/commit/450950da860d58047c654c1497ddb48d651f9076), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`13b1ca9`](https://github.com/TanStack/ai/commit/13b1ca918a0ac36761db2a6226973c5330d4221d), [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb)]: + - @tanstack/ai-harness@0.2.0 + - @tanstack/ai-sandbox@1.1.0 + - @tanstack/ai@1.1.0 + ## 1.0.0 ### Major Changes diff --git a/packages/ai-acp/package.json b/packages/ai-acp/package.json index 3604832dd2..c2e9467461 100644 --- a/packages/ai-acp/package.json +++ b/packages/ai-acp/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-acp", - "version": "1.0.0", + "version": "1.0.1", "description": "Shared Agent Client Protocol (ACP) transport, session, and AG-UI translation for TanStack AI harness adapters.", "author": "", "license": "MIT", diff --git a/packages/ai-anthropic/CHANGELOG.md b/packages/ai-anthropic/CHANGELOG.md index 4cbcb20dbf..8886c8c4f3 100644 --- a/packages/ai-anthropic/CHANGELOG.md +++ b/packages/ai-anthropic/CHANGELOG.md @@ -1,5 +1,26 @@ # @tanstack/ai-anthropic +## 1.1.0 + +### Minor Changes + +- [#1977](https://github.com/TanStack/ai/pull/1977) [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6) - Forward the new optional `abortSignal` of the files adapter to `upload`, `get`, and `delete`. + +### Patch Changes + +- [#1974](https://github.com/TanStack/ai/pull/1974) [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb) - 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`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`e17cae7`](https://github.com/TanStack/ai/commit/e17cae7aa40ce5ebe0e78496931d49c793bdaf41), [`d6ead13`](https://github.com/TanStack/ai/commit/d6ead13def85f91782e20d6c1b8755fdf1c836c2), [`450950d`](https://github.com/TanStack/ai/commit/450950da860d58047c654c1497ddb48d651f9076), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`13b1ca9`](https://github.com/TanStack/ai/commit/13b1ca918a0ac36761db2a6226973c5330d4221d), [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb)]: + - @tanstack/ai@1.1.0 + - @tanstack/ai-utils@1.0.1 + ## 1.0.0 ### Major Changes diff --git a/packages/ai-anthropic/package.json b/packages/ai-anthropic/package.json index 2da0ae69e9..5747520d21 100644 --- a/packages/ai-anthropic/package.json +++ b/packages/ai-anthropic/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-anthropic", - "version": "1.0.0", + "version": "1.1.0", "description": "Anthropic Claude adapter for TanStack AI chat, tool calling, thinking, and structured outputs.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-bedrock/CHANGELOG.md b/packages/ai-bedrock/CHANGELOG.md index d5b8b0c1fd..0f6a8541dd 100644 --- a/packages/ai-bedrock/CHANGELOG.md +++ b/packages/ai-bedrock/CHANGELOG.md @@ -1,5 +1,28 @@ # @tanstack/ai-bedrock +## 1.1.0 + +### Minor Changes + +- [#1977](https://github.com/TanStack/ai/pull/1977) [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6) - Forward the new optional embedding `abortSignal` to each `InvokeModel` call. + +### Patch Changes + +- [#1975](https://github.com/TanStack/ai/pull/1975) [`c7f8dfd`](https://github.com/TanStack/ai/commit/c7f8dfd58129c5538090fc9ab8c91cd93c6125ab) - Aborting a chat now cancels the Converse request to Bedrock, for streaming and for structured output. Before, the request kept running. + +- [#1974](https://github.com/TanStack/ai/pull/1974) [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb) - 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`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`d6ead13`](https://github.com/TanStack/ai/commit/d6ead13def85f91782e20d6c1b8755fdf1c836c2), [`450950d`](https://github.com/TanStack/ai/commit/450950da860d58047c654c1497ddb48d651f9076), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`13b1ca9`](https://github.com/TanStack/ai/commit/13b1ca918a0ac36761db2a6226973c5330d4221d), [`e17cae7`](https://github.com/TanStack/ai/commit/e17cae7aa40ce5ebe0e78496931d49c793bdaf41), [`940c402`](https://github.com/TanStack/ai/commit/940c402d8ca5220e3202326e03cc1f64654572a3), [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb)]: + - @tanstack/ai@1.1.0 + - @tanstack/openai-base@1.0.1 + ## 1.0.0 ### Major Changes diff --git a/packages/ai-bedrock/package.json b/packages/ai-bedrock/package.json index 8a3969898d..ba1d6bf2e4 100644 --- a/packages/ai-bedrock/package.json +++ b/packages/ai-bedrock/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-bedrock", - "version": "1.0.0", + "version": "1.1.0", "type": "module", "description": "Amazon Bedrock adapter for TanStack AI — OpenAI-compatible chat, responses, tools, and reasoning.", "author": "", diff --git a/packages/ai-byteplus/CHANGELOG.md b/packages/ai-byteplus/CHANGELOG.md index 105cf08ce3..5f40eb90ec 100644 --- a/packages/ai-byteplus/CHANGELOG.md +++ b/packages/ai-byteplus/CHANGELOG.md @@ -1,5 +1,22 @@ # @tanstack/ai-byteplus +## 1.1.0 + +### Minor Changes + +- [#1977](https://github.com/TanStack/ai/pull/1977) [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6) - Forward the new optional `abortSignal` of `getVideoStatus` and `getVideo` to the task lookup. A caller signal now works together with the config `timeout`. + +- [#1977](https://github.com/TanStack/ai/pull/1977) [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6) - `byteplusVideo` implements the optional `cancelVideoJob(jobId, options?)` with `DELETE /contents/generations/tasks/{id}`. Ark cancels only a queued task. A streaming `generateVideo()` calls it when the caller aborts. + +### Patch Changes + +- [#1975](https://github.com/TanStack/ai/pull/1975) [`c7f8dfd`](https://github.com/TanStack/ai/commit/c7f8dfd58129c5538090fc9ab8c91cd93c6125ab) - Aborting an image, video, speech, or transcription call now cancels the BytePlus request. Before, the request kept running and was billed. The image and video requests still stop at the configured `timeout`. + +- Updated dependencies [[`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`e17cae7`](https://github.com/TanStack/ai/commit/e17cae7aa40ce5ebe0e78496931d49c793bdaf41), [`d6ead13`](https://github.com/TanStack/ai/commit/d6ead13def85f91782e20d6c1b8755fdf1c836c2), [`450950d`](https://github.com/TanStack/ai/commit/450950da860d58047c654c1497ddb48d651f9076), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`13b1ca9`](https://github.com/TanStack/ai/commit/13b1ca918a0ac36761db2a6226973c5330d4221d), [`e17cae7`](https://github.com/TanStack/ai/commit/e17cae7aa40ce5ebe0e78496931d49c793bdaf41), [`940c402`](https://github.com/TanStack/ai/commit/940c402d8ca5220e3202326e03cc1f64654572a3), [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb)]: + - @tanstack/ai@1.1.0 + - @tanstack/ai-utils@1.0.1 + - @tanstack/openai-base@1.0.1 + ## 1.0.1 ### Patch Changes diff --git a/packages/ai-byteplus/package.json b/packages/ai-byteplus/package.json index 025d9e112d..614fe223f8 100644 --- a/packages/ai-byteplus/package.json +++ b/packages/ai-byteplus/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-byteplus", - "version": "1.0.1", + "version": "1.1.0", "description": "BytePlus ModelArk adapter for TanStack AI: Seed LLM chat, Seedance video, Seedream image, and Seed Speech TTS/ASR.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-claude-code/CHANGELOG.md b/packages/ai-claude-code/CHANGELOG.md index 7c3fb65a14..4d682bbcb0 100644 --- a/packages/ai-claude-code/CHANGELOG.md +++ b/packages/ai-claude-code/CHANGELOG.md @@ -1,5 +1,24 @@ # @tanstack/ai-claude-code +## 1.0.1 + +### Patch Changes + +- [#1976](https://github.com/TanStack/ai/pull/1976) [`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960) - The host tool bridge now gets the run signal from `chat()`. Before, it read only `abortController`, which `chat()` does not set, so a stopped run did not abort the bridged tools. + +- [#1974](https://github.com/TanStack/ai/pull/1974) [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb) - 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 [[`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32), [`d6ead13`](https://github.com/TanStack/ai/commit/d6ead13def85f91782e20d6c1b8755fdf1c836c2), [`450950d`](https://github.com/TanStack/ai/commit/450950da860d58047c654c1497ddb48d651f9076), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`13b1ca9`](https://github.com/TanStack/ai/commit/13b1ca918a0ac36761db2a6226973c5330d4221d), [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb)]: + - @tanstack/ai-sandbox@1.1.0 + - @tanstack/ai@1.1.0 + ## 1.0.0 ### Major Changes diff --git a/packages/ai-claude-code/package.json b/packages/ai-claude-code/package.json index 40322efb55..fa5f6e156d 100644 --- a/packages/ai-claude-code/package.json +++ b/packages/ai-claude-code/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-claude-code", - "version": "1.0.0", + "version": "1.0.1", "description": "Claude Code harness adapter for TanStack AI — run Claude Code as a chat backend with local tool execution and stateful sessions.", "author": "", "license": "MIT", diff --git a/packages/ai-client/CHANGELOG.md b/packages/ai-client/CHANGELOG.md index c42509526e..a6ab35d4b6 100644 --- a/packages/ai-client/CHANGELOG.md +++ b/packages/ai-client/CHANGELOG.md @@ -1,5 +1,35 @@ # @tanstack/ai-client +## 1.1.0 + +### Minor Changes + +- [#1978](https://github.com/TanStack/ai/pull/1978) [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32) - `createMcpAppBridge().callTool(input, { signal })` passes the signal to the call request. + +- [#1977](https://github.com/TanStack/ai/pull/1977) [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6) - A client tool now gets `abortSignal` in its execute context. It aborts when you call `stop()` on the `ChatClient`. + +- [#1977](https://github.com/TanStack/ai/pull/1977) [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6) - New optional cancel features. Old code works the same. + - `fetchServerSentEvents` and `fetchHttpStream` take an optional `cancelUrl`. With it, `ChatClient.stop()` sends `POST cancelUrl` with `{ runId, threadId }`, so the server can cancel a durable run. Only `stop()` sends it, not an unmount or a reload. + - Connection adapters can have an optional `cancelRun({ runId, threadId })` method. `stop()` calls it. + - `RealtimeClient` passes an `abortSignal` to `adapter.connect()`. A `disconnect()` during `connect()` aborts the setup, and the status goes to `idle`, not `error`. + +### Patch Changes + +- [#1979](https://github.com/TanStack/ai/pull/1979) [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31) - `stop()` no longer waits for a client tool that never settles. Fetch and XHR connection adapters now abort on the client's signal and on your own `options.signal`. `stream()` and `rpcStream()` end on abort even if the source ignores the signal. `RealtimeClient.disconnect()` during `connect()` or a token refresh no longer leaves a connection or a token refresh timer behind. + +- [#1979](https://github.com/TanStack/ai/pull/1979) [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31) - A cancel now stops the request. `stop()` and an abort of the connection `options.signal` reach the fetch, XHR, `stream()`, and `rpcStream()` requests. A realtime `disconnect()` during `connect()` does not stop a pending `getToken()` or `adapter.connect()` call: it drops the late result and closes the connection that comes back. An abort of `options.signal` now ends the chat like `stop()`, not as a finished run. A realtime connection that a later `connect()` replaced no longer changes the status of the live session. + +- [#1969](https://github.com/TanStack/ai/pull/1969) [`1e13e87`](https://github.com/TanStack/ai/commit/1e13e87b26ccd2734455fc4a958c0690ef3ead06) - Ask for approval of a `needsApproval` client tool when the server does not ask for it, for example a custom AG-UI server or a connection adapter with no TanStack server. Before, the client logged a warning and the tool never ran. Now the call comes in `interrupts` as a `tool-approval` item, the same as with `chat()`. On approve, the client runs the tool and continues the loop. On deny, it sends a denied result and continues. + +- [#1968](https://github.com/TanStack/ai/pull/1968) [`450950d`](https://github.com/TanStack/ai/commit/450950da860d58047c654c1497ddb48d651f9076) - 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. + +- [#1972](https://github.com/TanStack/ai/pull/1972) [`f33f72a`](https://github.com/TanStack/ai/commit/f33f72ab6da9a0f95bd912e29d2cabc2eab17f27) - Keep queued messages in the queue while a run is paused on an interrupt, for example a tool approval. Before, the queue sent the next message as soon as the paused run ended, so a new run started while the tool call was still unanswered. Now the queue sends after the run that answers the interrupt ends with success. + +- Updated dependencies [[`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`e17cae7`](https://github.com/TanStack/ai/commit/e17cae7aa40ce5ebe0e78496931d49c793bdaf41), [`d6ead13`](https://github.com/TanStack/ai/commit/d6ead13def85f91782e20d6c1b8755fdf1c836c2), [`450950d`](https://github.com/TanStack/ai/commit/450950da860d58047c654c1497ddb48d651f9076), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`13b1ca9`](https://github.com/TanStack/ai/commit/13b1ca918a0ac36761db2a6226973c5330d4221d), [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb)]: + - @tanstack/ai@1.1.0 + - @tanstack/ai-utils@1.0.1 + - @tanstack/ai-event-client@1.0.1 + ## 1.0.1 ### Patch Changes diff --git a/packages/ai-client/package.json b/packages/ai-client/package.json index 11842714ff..04d2aee739 100644 --- a/packages/ai-client/package.json +++ b/packages/ai-client/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-client", - "version": "1.0.1", + "version": "1.1.0", "description": "Framework-agnostic headless client for TanStack AI chat, realtime sessions, streaming transports, and media generations.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-cloudflare/CHANGELOG.md b/packages/ai-cloudflare/CHANGELOG.md index 1ae7bd3a19..7cb2bebcb0 100644 --- a/packages/ai-cloudflare/CHANGELOG.md +++ b/packages/ai-cloudflare/CHANGELOG.md @@ -1,5 +1,27 @@ # @tanstack/ai-cloudflare +## 1.1.0 + +### Minor Changes + +- [#1977](https://github.com/TanStack/ai/pull/1977) [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6) - Forward the new optional embedding `abortSignal` to the Workers AI REST request. + +### Patch Changes + +- [#1974](https://github.com/TanStack/ai/pull/1974) [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb) - 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`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`e17cae7`](https://github.com/TanStack/ai/commit/e17cae7aa40ce5ebe0e78496931d49c793bdaf41), [`d6ead13`](https://github.com/TanStack/ai/commit/d6ead13def85f91782e20d6c1b8755fdf1c836c2), [`450950d`](https://github.com/TanStack/ai/commit/450950da860d58047c654c1497ddb48d651f9076), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`13b1ca9`](https://github.com/TanStack/ai/commit/13b1ca918a0ac36761db2a6226973c5330d4221d), [`e17cae7`](https://github.com/TanStack/ai/commit/e17cae7aa40ce5ebe0e78496931d49c793bdaf41), [`940c402`](https://github.com/TanStack/ai/commit/940c402d8ca5220e3202326e03cc1f64654572a3), [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb)]: + - @tanstack/ai@1.1.0 + - @tanstack/ai-utils@1.0.1 + - @tanstack/openai-base@1.0.1 + ## 1.0.0 ### Major Changes diff --git a/packages/ai-cloudflare/package.json b/packages/ai-cloudflare/package.json index c197987cfe..53b061efcf 100644 --- a/packages/ai-cloudflare/package.json +++ b/packages/ai-cloudflare/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-cloudflare", - "version": "1.0.0", + "version": "1.1.0", "description": "Cloudflare adapter for TanStack AI — Workers AI chat, embeddings, images, speech, transcription, and summarization over the AI binding or REST, with AI Gateway routing for any provider.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-code-mode/CHANGELOG.md b/packages/ai-code-mode/CHANGELOG.md index bbdf6bdd4a..065ac75870 100644 --- a/packages/ai-code-mode/CHANGELOG.md +++ b/packages/ai-code-mode/CHANGELOG.md @@ -1,5 +1,19 @@ # @tanstack/ai-code-mode +## 1.1.0 + +### Minor Changes + +- [#1978](https://github.com/TanStack/ai/pull/1978) [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32) - `IsolateContext.execute(code, options?)` takes an optional `{ signal }`. `execute_typescript` passes the abort signal of the tool call, so a driver can stop the run. + +### Patch Changes + +- [#1976](https://github.com/TanStack/ai/pull/1976) [`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960) - An abort of the run now ends the `execute_typescript` program: a call that waits for an approval stops, and the isolate is disposed. + +- Updated dependencies [[`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32), [`d6ead13`](https://github.com/TanStack/ai/commit/d6ead13def85f91782e20d6c1b8755fdf1c836c2), [`450950d`](https://github.com/TanStack/ai/commit/450950da860d58047c654c1497ddb48d651f9076), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`13b1ca9`](https://github.com/TanStack/ai/commit/13b1ca918a0ac36761db2a6226973c5330d4221d), [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb)]: + - @tanstack/ai-harness@0.2.0 + - @tanstack/ai@1.1.0 + ## 1.0.1 ### Patch Changes diff --git a/packages/ai-code-mode/package.json b/packages/ai-code-mode/package.json index 3f1d159d62..bf46374e21 100644 --- a/packages/ai-code-mode/package.json +++ b/packages/ai-code-mode/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-code-mode", - "version": "1.0.1", + "version": "1.1.0", "description": "Secure TypeScript Code Mode for TanStack AI agents to execute sandboxed tool orchestration programs.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-codex/CHANGELOG.md b/packages/ai-codex/CHANGELOG.md index 8ff8220f1a..dc5278913e 100644 --- a/packages/ai-codex/CHANGELOG.md +++ b/packages/ai-codex/CHANGELOG.md @@ -1,5 +1,24 @@ # @tanstack/ai-codex +## 1.0.1 + +### Patch Changes + +- [#1976](https://github.com/TanStack/ai/pull/1976) [`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960) - The host tool bridge now gets the run signal from `chat()`. Before, it read only `abortController`, which `chat()` does not set, so a stopped run did not abort the bridged tools. + +- [#1974](https://github.com/TanStack/ai/pull/1974) [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb) - 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 [[`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32), [`d6ead13`](https://github.com/TanStack/ai/commit/d6ead13def85f91782e20d6c1b8755fdf1c836c2), [`450950d`](https://github.com/TanStack/ai/commit/450950da860d58047c654c1497ddb48d651f9076), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`13b1ca9`](https://github.com/TanStack/ai/commit/13b1ca918a0ac36761db2a6226973c5330d4221d), [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb)]: + - @tanstack/ai-sandbox@1.1.0 + - @tanstack/ai@1.1.0 + ## 1.0.0 ### Major Changes diff --git a/packages/ai-codex/package.json b/packages/ai-codex/package.json index 5d747d059d..403171c5d6 100644 --- a/packages/ai-codex/package.json +++ b/packages/ai-codex/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-codex", - "version": "1.0.0", + "version": "1.0.1", "description": "Codex harness adapter for TanStack AI — run OpenAI Codex as a chat backend with local tool execution and stateful sessions.", "author": "", "license": "MIT", diff --git a/packages/ai-cohere/CHANGELOG.md b/packages/ai-cohere/CHANGELOG.md index 835b8539dd..fe122b7535 100644 --- a/packages/ai-cohere/CHANGELOG.md +++ b/packages/ai-cohere/CHANGELOG.md @@ -1,5 +1,19 @@ # @tanstack/ai-cohere +## 1.1.0 + +### Minor Changes + +- [#1977](https://github.com/TanStack/ai/pull/1977) [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6) - Forward the new optional embedding `abortSignal` to the embed request and to an image URL download. + +### Patch Changes + +- [#1984](https://github.com/TanStack/ai/pull/1984) [`bf98d01`](https://github.com/TanStack/ai/commit/bf98d01adb31e56ed43dd581ab83f05929794083) - `embed()` with the Cohere adapter no longer fails with a 400 when given more than 96 inputs. The adapter now splits the input into requests of at most 96 (the `v2/embed` per-request limit) and returns the vectors in input order, with token usage summed across requests. + +- Updated dependencies [[`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`e17cae7`](https://github.com/TanStack/ai/commit/e17cae7aa40ce5ebe0e78496931d49c793bdaf41), [`d6ead13`](https://github.com/TanStack/ai/commit/d6ead13def85f91782e20d6c1b8755fdf1c836c2), [`450950d`](https://github.com/TanStack/ai/commit/450950da860d58047c654c1497ddb48d651f9076), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`13b1ca9`](https://github.com/TanStack/ai/commit/13b1ca918a0ac36761db2a6226973c5330d4221d), [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb)]: + - @tanstack/ai@1.1.0 + - @tanstack/ai-utils@1.0.1 + ## 1.0.0 ### Major Changes diff --git a/packages/ai-cohere/package.json b/packages/ai-cohere/package.json index b15445e8d1..cd39495b8b 100644 --- a/packages/ai-cohere/package.json +++ b/packages/ai-cohere/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-cohere", - "version": "1.0.0", + "version": "1.1.0", "description": "Cohere adapter for TanStack AI — multimodal embeddings and document reranking.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-computer-playwright/CHANGELOG.md b/packages/ai-computer-playwright/CHANGELOG.md index 317b863361..4ae8825e9c 100644 --- a/packages/ai-computer-playwright/CHANGELOG.md +++ b/packages/ai-computer-playwright/CHANGELOG.md @@ -1,5 +1,16 @@ # @tanstack/ai-computer-playwright +## 1.1.0 + +### Minor Changes + +- [#1978](https://github.com/TanStack/ai/pull/1978) [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32) - `screenshot`, `zoom`, and `navigate` reject when their signal aborts. Playwright takes no signal, so the page call continues in the background. The factory closes the new browser context when `create` aborts during the start URL. + +### Patch Changes + +- Updated dependencies [[`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32)]: + - @tanstack/ai-computer-use@1.1.0 + ## 1.0.0 ### Major Changes diff --git a/packages/ai-computer-playwright/package.json b/packages/ai-computer-playwright/package.json index da71044635..590dd93160 100644 --- a/packages/ai-computer-playwright/package.json +++ b/packages/ai-computer-playwright/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-computer-playwright", - "version": "1.0.0", + "version": "1.1.0", "description": "Playwright browser driver for TanStack AI computer use.", "author": "", "license": "MIT", diff --git a/packages/ai-computer-sandbox/CHANGELOG.md b/packages/ai-computer-sandbox/CHANGELOG.md index 4d3889438e..fb32da39c7 100644 --- a/packages/ai-computer-sandbox/CHANGELOG.md +++ b/packages/ai-computer-sandbox/CHANGELOG.md @@ -1,5 +1,20 @@ # @tanstack/ai-computer-sandbox +## 1.1.0 + +### Minor Changes + +- [#1978](https://github.com/TanStack/ai/pull/1978) [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32) - Pass the `create()` signal to `provider.create()`. + +- [#1978](https://github.com/TanStack/ai/pull/1978) [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32) - The driver passes the signal of each action to `sandbox.process.exec`, so an abort stops the xdotool or screenshot command. `createSandboxComputerDriver({ signal })` stops the setup commands, and `sandboxComputer` passes the `create` signal to it. + +### Patch Changes + +- Updated dependencies [[`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960), [`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32), [`e17cae7`](https://github.com/TanStack/ai/commit/e17cae7aa40ce5ebe0e78496931d49c793bdaf41)]: + - @tanstack/ai-computer-use@1.1.0 + - @tanstack/ai-sandbox@1.1.0 + - @tanstack/ai-utils@1.0.1 + ## 1.0.0 ### Major Changes diff --git a/packages/ai-computer-sandbox/package.json b/packages/ai-computer-sandbox/package.json index 8d83ac39c5..ca8f4ba20d 100644 --- a/packages/ai-computer-sandbox/package.json +++ b/packages/ai-computer-sandbox/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-computer-sandbox", - "version": "1.0.0", + "version": "1.1.0", "description": "Sandbox desktop driver for TanStack AI computer use. Works with any @tanstack/ai-sandbox provider.", "author": "", "license": "MIT", diff --git a/packages/ai-computer-use/CHANGELOG.md b/packages/ai-computer-use/CHANGELOG.md index 641c7e96de..b5aa23c118 100644 --- a/packages/ai-computer-use/CHANGELOG.md +++ b/packages/ai-computer-use/CHANGELOG.md @@ -1,5 +1,22 @@ # @tanstack/ai-computer-use +## 1.1.0 + +### Minor Changes + +- [#1978](https://github.com/TanStack/ai/pull/1978) [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32) - `ComputerDriverFactory.create({ threadId, signal })` gets the abort signal of the tool call that needs the machine. + +- [#1978](https://github.com/TanStack/ai/pull/1978) [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32) - Each `ComputerDriver` action takes an optional `signal`, for example `move(x, y, { signal })` and `click(x, y, { button, count, signal })`. The computer tools pass the abort signal of the tool call to each action. An abort also stops the `wait` and `hold_key` waits and the wait before the screenshot. `keyUp` and `mouseUp` get no signal, so held keys and buttons are released after an abort. + +### Patch Changes + +- [#1976](https://github.com/TanStack/ai/pull/1976) [`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960) - An aborted computer action no longer runs when it waits in the queue. A `wait`, `hold_key`, a repeated key press, a `navigate`, or the next action of a batch now stops when the call aborts. Held keys are still released. A drag does not start after an abort. A drag that started goes to its end point, because a release in the middle drops the item at the wrong point. + +- Updated dependencies [[`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32), [`e17cae7`](https://github.com/TanStack/ai/commit/e17cae7aa40ce5ebe0e78496931d49c793bdaf41), [`d6ead13`](https://github.com/TanStack/ai/commit/d6ead13def85f91782e20d6c1b8755fdf1c836c2), [`450950d`](https://github.com/TanStack/ai/commit/450950da860d58047c654c1497ddb48d651f9076), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`13b1ca9`](https://github.com/TanStack/ai/commit/13b1ca918a0ac36761db2a6226973c5330d4221d), [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb)]: + - @tanstack/ai-harness@0.2.0 + - @tanstack/ai@1.1.0 + - @tanstack/ai-utils@1.0.1 + ## 1.0.0 ### Major Changes diff --git a/packages/ai-computer-use/package.json b/packages/ai-computer-use/package.json index e620311ddc..2d566e76ae 100644 --- a/packages/ai-computer-use/package.json +++ b/packages/ai-computer-use/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-computer-use", - "version": "1.0.0", + "version": "1.1.0", "description": "Provider-agnostic computer use for TanStack AI.", "author": "", "license": "MIT", diff --git a/packages/ai-elevenlabs/CHANGELOG.md b/packages/ai-elevenlabs/CHANGELOG.md index c5b6cba698..d3da80da37 100644 --- a/packages/ai-elevenlabs/CHANGELOG.md +++ b/packages/ai-elevenlabs/CHANGELOG.md @@ -1,5 +1,19 @@ # @tanstack/ai-elevenlabs +## 1.1.0 + +### Minor Changes + +- [#1977](https://github.com/TanStack/ai/pull/1977) [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6) - Forward the new optional `abortSignal` of `generateToken()` to the signed URL request. + +### Patch Changes + +- [#1975](https://github.com/TanStack/ai/pull/1975) [`c7f8dfd`](https://github.com/TanStack/ai/commit/c7f8dfd58129c5538090fc9ab8c91cd93c6125ab) - An abort now cancels the ElevenLabs request for speech, dialogue, music, sound effects, and transcription. Before, the adapters did not give the abort signal to the SDK, so the request ran to the end and was billed. + +- Updated dependencies [[`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`e17cae7`](https://github.com/TanStack/ai/commit/e17cae7aa40ce5ebe0e78496931d49c793bdaf41), [`d6ead13`](https://github.com/TanStack/ai/commit/d6ead13def85f91782e20d6c1b8755fdf1c836c2), [`450950d`](https://github.com/TanStack/ai/commit/450950da860d58047c654c1497ddb48d651f9076), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`13b1ca9`](https://github.com/TanStack/ai/commit/13b1ca918a0ac36761db2a6226973c5330d4221d), [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb)]: + - @tanstack/ai@1.1.0 + - @tanstack/ai-utils@1.0.1 + ## 1.0.0 ### Major Changes diff --git a/packages/ai-elevenlabs/package.json b/packages/ai-elevenlabs/package.json index 9e3bd78b2c..4557655cd6 100644 --- a/packages/ai-elevenlabs/package.json +++ b/packages/ai-elevenlabs/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-elevenlabs", - "version": "1.0.0", + "version": "1.1.0", "description": "ElevenLabs adapter for TanStack AI realtime voice, text-to-speech, transcription, music, and sound effects.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-event-client/CHANGELOG.md b/packages/ai-event-client/CHANGELOG.md index 1580b40f99..9fa771126d 100644 --- a/packages/ai-event-client/CHANGELOG.md +++ b/packages/ai-event-client/CHANGELOG.md @@ -1,5 +1,18 @@ # @tanstack/ai-event-client +## 1.0.1 + +### Patch Changes + +- [#1974](https://github.com/TanStack/ai/pull/1974) [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb) - 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`. + ## 1.0.0 ### Major Changes diff --git a/packages/ai-event-client/package.json b/packages/ai-event-client/package.json index 41ca9d411b..8b1d2b5006 100644 --- a/packages/ai-event-client/package.json +++ b/packages/ai-event-client/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-event-client", - "version": "1.0.0", + "version": "1.0.1", "description": "Typed event client for TanStack AI devtools, observability, and streamed runtime events.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-fal/CHANGELOG.md b/packages/ai-fal/CHANGELOG.md index 58671c466f..d05dc9687a 100644 --- a/packages/ai-fal/CHANGELOG.md +++ b/packages/ai-fal/CHANGELOG.md @@ -1,5 +1,21 @@ # @tanstack/ai-fal +## 1.1.0 + +### Minor Changes + +- [#1977](https://github.com/TanStack/ai/pull/1977) [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6) - Forward the new optional `abortSignal` of `getVideoStatus` and `getVideo` to `fal.queue.status` and `fal.queue.result`. + +- [#1977](https://github.com/TanStack/ai/pull/1977) [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6) - `falVideo` implements the optional `cancelVideoJob(jobId, options?)` with `fal.queue.cancel`. A streaming `generateVideo()` calls it when the caller aborts. + +### Patch Changes + +- [#1975](https://github.com/TanStack/ai/pull/1975) [`c7f8dfd`](https://github.com/TanStack/ai/commit/c7f8dfd58129c5538090fc9ab8c91cd93c6125ab) - An abort now asks fal to cancel the job for image, audio, speech, and transcription. fal stops a queued job. For a job that already runs, the model app decides whether it stops. The speech audio download also stops on abort. + +- Updated dependencies [[`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`e17cae7`](https://github.com/TanStack/ai/commit/e17cae7aa40ce5ebe0e78496931d49c793bdaf41), [`d6ead13`](https://github.com/TanStack/ai/commit/d6ead13def85f91782e20d6c1b8755fdf1c836c2), [`450950d`](https://github.com/TanStack/ai/commit/450950da860d58047c654c1497ddb48d651f9076), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`13b1ca9`](https://github.com/TanStack/ai/commit/13b1ca918a0ac36761db2a6226973c5330d4221d), [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb)]: + - @tanstack/ai@1.1.0 + - @tanstack/ai-utils@1.0.1 + ## 1.0.1 ### Patch Changes diff --git a/packages/ai-fal/package.json b/packages/ai-fal/package.json index 5fce3da485..8fdf960fa4 100644 --- a/packages/ai-fal/package.json +++ b/packages/ai-fal/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-fal", - "version": "1.0.1", + "version": "1.1.0", "description": "fal.ai adapter for TanStack AI image, video, live, audio, speech, and transcription generation.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-gemini/CHANGELOG.md b/packages/ai-gemini/CHANGELOG.md index efa19868c0..9c948e93b2 100644 --- a/packages/ai-gemini/CHANGELOG.md +++ b/packages/ai-gemini/CHANGELOG.md @@ -1,5 +1,32 @@ # @tanstack/ai-gemini +## 1.1.0 + +### Minor Changes + +- [#1977](https://github.com/TanStack/ai/pull/1977) [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6) - Forward the new optional `abortSignal` in embeddings, Veo and Omni video status and download, files `get` and `delete`, and the realtime token request. `uploadGeminiFile()` takes `abortSignal`: it cancels the status requests and the wait between polls. + +### Patch Changes + +- [#1975](https://github.com/TanStack/ai/pull/1975) [`c7f8dfd`](https://github.com/TanStack/ai/commit/c7f8dfd58129c5538090fc9ab8c91cd93c6125ab) - Aborting a call now cancels the Gemini request for Lyria audio, speech, Veo and Omni video creation, the Veo input image download, and chat with agentic video. Before, the request kept running and was billed. + +- [#1970](https://github.com/TanStack/ai/pull/1970) [`649f026`](https://github.com/TanStack/ai/commit/649f026e3f24c0f6da829877051a2f7829a919b5) - Count thinking tokens in `completionTokens`. Gemini reports `thoughtsTokenCount` separately from `candidatesTokenCount` but bills both as output, so `completionTokens` was lower than `totalTokens - promptTokens` for thinking models. `completionTokensDetails.reasoningTokens` is unchanged. + +- [#1928](https://github.com/TanStack/ai/pull/1928) [`a4007b4`](https://github.com/TanStack/ai/commit/a4007b4a8b5457ce799d3545baa76b5c93e50594) - Native Gemini image generation no longer throws `image interaction returned no id.` when `modelOptions.store` is `false`. Gemini leaves the interaction id out of an unstored interaction, so the result gets a local id, which cannot be passed as `previous_interaction_id`. A stored interaction without an id still throws. + +- [#1974](https://github.com/TanStack/ai/pull/1974) [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb) - 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`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`e17cae7`](https://github.com/TanStack/ai/commit/e17cae7aa40ce5ebe0e78496931d49c793bdaf41), [`d6ead13`](https://github.com/TanStack/ai/commit/d6ead13def85f91782e20d6c1b8755fdf1c836c2), [`450950d`](https://github.com/TanStack/ai/commit/450950da860d58047c654c1497ddb48d651f9076), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`13b1ca9`](https://github.com/TanStack/ai/commit/13b1ca918a0ac36761db2a6226973c5330d4221d), [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb)]: + - @tanstack/ai@1.1.0 + - @tanstack/ai-utils@1.0.1 + ## 1.0.1 ### Patch Changes diff --git a/packages/ai-gemini/package.json b/packages/ai-gemini/package.json index d199e820e4..b43964f864 100644 --- a/packages/ai-gemini/package.json +++ b/packages/ai-gemini/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-gemini", - "version": "1.0.1", + "version": "1.1.0", "description": "Google Gemini adapter for TanStack AI chat, images, speech, audio generation, and structured outputs.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-grok-build/CHANGELOG.md b/packages/ai-grok-build/CHANGELOG.md index 10b5390752..cfcdbf9033 100644 --- a/packages/ai-grok-build/CHANGELOG.md +++ b/packages/ai-grok-build/CHANGELOG.md @@ -1,5 +1,25 @@ # @tanstack/ai-grok-build +## 1.0.1 + +### Patch Changes + +- [#1976](https://github.com/TanStack/ai/pull/1976) [`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960) - The host tool bridge of the `streaming-json` protocol now gets the run signal from `chat()`. Before, it read only `abortController`, which `chat()` does not set, so a stopped run did not abort the bridged tools. + +- [#1974](https://github.com/TanStack/ai/pull/1974) [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb) - 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 [[`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960), [`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32), [`d6ead13`](https://github.com/TanStack/ai/commit/d6ead13def85f91782e20d6c1b8755fdf1c836c2), [`450950d`](https://github.com/TanStack/ai/commit/450950da860d58047c654c1497ddb48d651f9076), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`13b1ca9`](https://github.com/TanStack/ai/commit/13b1ca918a0ac36761db2a6226973c5330d4221d), [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb)]: + - @tanstack/ai-acp@1.0.1 + - @tanstack/ai-sandbox@1.1.0 + - @tanstack/ai@1.1.0 + ## 1.0.0 ### Major Changes diff --git a/packages/ai-grok-build/package.json b/packages/ai-grok-build/package.json index 009684820a..c6107afd5a 100644 --- a/packages/ai-grok-build/package.json +++ b/packages/ai-grok-build/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-grok-build", - "version": "1.0.0", + "version": "1.0.1", "description": "Grok Build harness adapter for TanStack AI — run Grok Build as a chat backend with local tool execution and stateful sessions.", "author": "", "license": "MIT", diff --git a/packages/ai-grok/CHANGELOG.md b/packages/ai-grok/CHANGELOG.md index 72cabfd18e..73a2c2ecd2 100644 --- a/packages/ai-grok/CHANGELOG.md +++ b/packages/ai-grok/CHANGELOG.md @@ -1,5 +1,22 @@ # @tanstack/ai-grok +## 1.1.0 + +### Minor Changes + +- [#1977](https://github.com/TanStack/ai/pull/1977) [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6) - Forward the new optional `abortSignal` in video status and download, files upload/get/delete, the realtime token request, and the realtime WebRTC SDP request. + +### Patch Changes + +- [#1975](https://github.com/TanStack/ai/pull/1975) [`c7f8dfd`](https://github.com/TanStack/ai/commit/c7f8dfd58129c5538090fc9ab8c91cd93c6125ab) - Aborting `generateImage()`, `generateSpeech()`, `generateTranscription()` or `generateVideo()` now stops the xAI request. Before, the call rejected but the request kept running and was billed. + +- [#1957](https://github.com/TanStack/ai/pull/1957) [`7f64043`](https://github.com/TanStack/ai/commit/7f640439592ada1c1d870836e9880bb1a167bd1c) - Fix the README usage examples: they imported `generate` (and `generateImages` for Grok) from `@tanstack/ai`, which do not exist. They now use `chat({ stream: false })` and `generateImage`. + +- Updated dependencies [[`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`e17cae7`](https://github.com/TanStack/ai/commit/e17cae7aa40ce5ebe0e78496931d49c793bdaf41), [`d6ead13`](https://github.com/TanStack/ai/commit/d6ead13def85f91782e20d6c1b8755fdf1c836c2), [`450950d`](https://github.com/TanStack/ai/commit/450950da860d58047c654c1497ddb48d651f9076), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`13b1ca9`](https://github.com/TanStack/ai/commit/13b1ca918a0ac36761db2a6226973c5330d4221d), [`e17cae7`](https://github.com/TanStack/ai/commit/e17cae7aa40ce5ebe0e78496931d49c793bdaf41), [`940c402`](https://github.com/TanStack/ai/commit/940c402d8ca5220e3202326e03cc1f64654572a3), [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb)]: + - @tanstack/ai@1.1.0 + - @tanstack/ai-utils@1.0.1 + - @tanstack/openai-base@1.0.1 + ## 1.0.1 ### Patch Changes diff --git a/packages/ai-grok/package.json b/packages/ai-grok/package.json index 06e87c59f6..f969a1c187 100644 --- a/packages/ai-grok/package.json +++ b/packages/ai-grok/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-grok", - "version": "1.0.1", + "version": "1.1.0", "description": "xAI Grok adapter for TanStack AI chat, image generation, realtime, and structured outputs.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-groq/CHANGELOG.md b/packages/ai-groq/CHANGELOG.md index 13c4b593bc..c8813efe7b 100644 --- a/packages/ai-groq/CHANGELOG.md +++ b/packages/ai-groq/CHANGELOG.md @@ -1,5 +1,27 @@ # @tanstack/ai-groq +## 1.0.1 + +### Patch Changes + +- [#1975](https://github.com/TanStack/ai/pull/1975) [`c7f8dfd`](https://github.com/TanStack/ai/commit/c7f8dfd58129c5538090fc9ab8c91cd93c6125ab) - Aborting `generateSpeech()` or `generateTranscription()` now stops the Groq request. Before, the call rejected but the request kept running and was billed. + +- [#1957](https://github.com/TanStack/ai/pull/1957) [`7f64043`](https://github.com/TanStack/ai/commit/7f640439592ada1c1d870836e9880bb1a167bd1c) - Fix the README usage examples: they imported `generate` (and `generateImages` for Grok) from `@tanstack/ai`, which do not exist. They now use `chat({ stream: false })` and `generateImage`. + +- [#1974](https://github.com/TanStack/ai/pull/1974) [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb) - 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`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`e17cae7`](https://github.com/TanStack/ai/commit/e17cae7aa40ce5ebe0e78496931d49c793bdaf41), [`d6ead13`](https://github.com/TanStack/ai/commit/d6ead13def85f91782e20d6c1b8755fdf1c836c2), [`450950d`](https://github.com/TanStack/ai/commit/450950da860d58047c654c1497ddb48d651f9076), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`13b1ca9`](https://github.com/TanStack/ai/commit/13b1ca918a0ac36761db2a6226973c5330d4221d), [`e17cae7`](https://github.com/TanStack/ai/commit/e17cae7aa40ce5ebe0e78496931d49c793bdaf41), [`940c402`](https://github.com/TanStack/ai/commit/940c402d8ca5220e3202326e03cc1f64654572a3), [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb)]: + - @tanstack/ai@1.1.0 + - @tanstack/ai-utils@1.0.1 + - @tanstack/openai-base@1.0.1 + ## 1.0.0 ### Major Changes diff --git a/packages/ai-groq/package.json b/packages/ai-groq/package.json index e793ccc034..43863f40b8 100644 --- a/packages/ai-groq/package.json +++ b/packages/ai-groq/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-groq", - "version": "1.0.0", + "version": "1.0.1", "description": "Groq adapter for TanStack AI low-latency chat, tool calling, and structured outputs.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-harness-cli/CHANGELOG.md b/packages/ai-harness-cli/CHANGELOG.md index de89a4f51a..73970e8ebd 100644 --- a/packages/ai-harness-cli/CHANGELOG.md +++ b/packages/ai-harness-cli/CHANGELOG.md @@ -1,5 +1,15 @@ # @tanstack/ai-harness-cli +## 0.1.1 + +### Patch Changes + +- Updated dependencies [[`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960), [`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960), [`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32), [`c7a1b4d`](https://github.com/TanStack/ai/commit/c7a1b4d4ee223add367715bac8fd1150a0c71fcd), [`d6ead13`](https://github.com/TanStack/ai/commit/d6ead13def85f91782e20d6c1b8755fdf1c836c2), [`450950d`](https://github.com/TanStack/ai/commit/450950da860d58047c654c1497ddb48d651f9076), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`13b1ca9`](https://github.com/TanStack/ai/commit/13b1ca918a0ac36761db2a6226973c5330d4221d), [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb)]: + - @tanstack/ai-acp@1.0.1 + - @tanstack/ai-harness@0.2.0 + - @tanstack/ai-mcp@1.1.0 + - @tanstack/ai@1.1.0 + ## 0.1.0 ### Minor Changes diff --git a/packages/ai-harness-cli/package.json b/packages/ai-harness-cli/package.json index 799358abca..1276a8fe9c 100644 --- a/packages/ai-harness-cli/package.json +++ b/packages/ai-harness-cli/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-harness-cli", - "version": "0.1.0", + "version": "0.1.1", "description": "Run a TanStack AI harness from the terminal: line mode or your own screen, print mode, NDJSON, ACP, MCP, and an HTTP server", "author": "", "license": "MIT", diff --git a/packages/ai-harness/CHANGELOG.md b/packages/ai-harness/CHANGELOG.md index d1fa1c423d..e73729c628 100644 --- a/packages/ai-harness/CHANGELOG.md +++ b/packages/ai-harness/CHANGELOG.md @@ -1,5 +1,29 @@ # @tanstack/ai-harness +## 0.2.0 + +### Minor Changes + +- [#1978](https://github.com/TanStack/ai/pull/1978) [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32) - Each request method of `createHarnessClient` takes an optional last argument `{ signal }`: the control inputs, `snapshot`, `transcript`, `agentTranscript`, `describe`, `putMedia`, `mediaUrl`, `loadMedia`, and `sessions.*`. + +### Patch Changes + +- [#1976](https://github.com/TanStack/ai/pull/1976) [`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960) - The `list_files` and `grep` commands now get the abort signal of the tool call. `harnessText` now cancels the inner turn, or the remote turn, when the caller stops reading the stream early. + +- [#1974](https://github.com/TanStack/ai/pull/1974) [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb) - 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`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`e17cae7`](https://github.com/TanStack/ai/commit/e17cae7aa40ce5ebe0e78496931d49c793bdaf41), [`d6ead13`](https://github.com/TanStack/ai/commit/d6ead13def85f91782e20d6c1b8755fdf1c836c2), [`450950d`](https://github.com/TanStack/ai/commit/450950da860d58047c654c1497ddb48d651f9076), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`13b1ca9`](https://github.com/TanStack/ai/commit/13b1ca918a0ac36761db2a6226973c5330d4221d), [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb)]: + - @tanstack/ai@1.1.0 + - @tanstack/ai-utils@1.0.1 + - @tanstack/ai-persistence@1.0.1 + ## 0.1.1 ### Patch Changes diff --git a/packages/ai-harness/package.json b/packages/ai-harness/package.json index aa968314a2..f1a7ab2169 100644 --- a/packages/ai-harness/package.json +++ b/packages/ai-harness/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-harness", - "version": "0.1.1", + "version": "0.2.0", "description": "Build agent harnesses on TanStack AI: long-lived sessions, typed agents, and plugins", "keywords": [ "agent", diff --git a/packages/ai-isolate-cloudflare/CHANGELOG.md b/packages/ai-isolate-cloudflare/CHANGELOG.md index b75d01bb87..a2c859f55e 100644 --- a/packages/ai-isolate-cloudflare/CHANGELOG.md +++ b/packages/ai-isolate-cloudflare/CHANGELOG.md @@ -1,5 +1,16 @@ # @tanstack/ai-isolate-cloudflare +## 1.1.0 + +### Minor Changes + +- [#1978](https://github.com/TanStack/ai/pull/1978) [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32) - Forward the `execute()` signal to the worker request. + +### Patch Changes + +- Updated dependencies [[`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32)]: + - @tanstack/ai-code-mode@1.1.0 + ## 1.0.0 ### Major Changes diff --git a/packages/ai-isolate-cloudflare/package.json b/packages/ai-isolate-cloudflare/package.json index 2625e2bbc7..84624234cb 100644 --- a/packages/ai-isolate-cloudflare/package.json +++ b/packages/ai-isolate-cloudflare/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-isolate-cloudflare", - "version": "1.0.0", + "version": "1.1.0", "description": "Cloudflare Workers sandbox driver for TanStack AI Code Mode TypeScript execution at the edge.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-isolate-daytona/CHANGELOG.md b/packages/ai-isolate-daytona/CHANGELOG.md index 923d583c67..f41649ba35 100644 --- a/packages/ai-isolate-daytona/CHANGELOG.md +++ b/packages/ai-isolate-daytona/CHANGELOG.md @@ -1,5 +1,16 @@ # @tanstack/ai-isolate-daytona +## 1.1.0 + +### Minor Changes + +- [#1978](https://github.com/TanStack/ai/pull/1978) [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32) - When the `execute()` signal aborts, `execute()` returns an `AbortError` failure and starts no more tool rounds. The Daytona SDK cannot cancel a `codeRun`, so a run that already started continues in the sandbox until its own timeout. + +### Patch Changes + +- Updated dependencies [[`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32)]: + - @tanstack/ai-code-mode@1.1.0 + ## 1.0.0 ### Major Changes diff --git a/packages/ai-isolate-daytona/package.json b/packages/ai-isolate-daytona/package.json index b70627853d..2bc8f9ed82 100644 --- a/packages/ai-isolate-daytona/package.json +++ b/packages/ai-isolate-daytona/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-isolate-daytona", - "version": "1.0.0", + "version": "1.1.0", "description": "Daytona sandbox driver for TanStack AI Code Mode TypeScript execution.", "author": "", "license": "MIT", diff --git a/packages/ai-isolate-e2b/CHANGELOG.md b/packages/ai-isolate-e2b/CHANGELOG.md index 1b1d3128dc..b65b34b6af 100644 --- a/packages/ai-isolate-e2b/CHANGELOG.md +++ b/packages/ai-isolate-e2b/CHANGELOG.md @@ -1,5 +1,16 @@ # @tanstack/ai-isolate-e2b +## 1.1.0 + +### Minor Changes + +- [#1978](https://github.com/TanStack/ai/pull/1978) [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32) - Kill the sandbox process group when the `execute()` signal aborts. The run returns an `AbortError` failure. + +### Patch Changes + +- Updated dependencies [[`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32)]: + - @tanstack/ai-code-mode@1.1.0 + ## 1.0.0 ### Major Changes diff --git a/packages/ai-isolate-e2b/package.json b/packages/ai-isolate-e2b/package.json index 0e07c5cf34..eed4b87964 100644 --- a/packages/ai-isolate-e2b/package.json +++ b/packages/ai-isolate-e2b/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-isolate-e2b", - "version": "1.0.0", + "version": "1.1.0", "description": "E2B sandbox driver for TanStack AI Code Mode TypeScript execution.", "author": "", "license": "MIT", diff --git a/packages/ai-isolate-node/CHANGELOG.md b/packages/ai-isolate-node/CHANGELOG.md index 3aa8c2fc29..cb165c5057 100644 --- a/packages/ai-isolate-node/CHANGELOG.md +++ b/packages/ai-isolate-node/CHANGELOG.md @@ -1,5 +1,16 @@ # @tanstack/ai-isolate-node +## 1.1.0 + +### Minor Changes + +- [#1978](https://github.com/TanStack/ai/pull/1978) [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32) - Stop a running script when the `execute()` signal aborts. The run returns an `AbortError` failure. + +### Patch Changes + +- Updated dependencies [[`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32)]: + - @tanstack/ai-code-mode@1.1.0 + ## 1.0.0 ### Major Changes diff --git a/packages/ai-isolate-node/package.json b/packages/ai-isolate-node/package.json index 2af8d07a68..ee7859e560 100644 --- a/packages/ai-isolate-node/package.json +++ b/packages/ai-isolate-node/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-isolate-node", - "version": "1.0.0", + "version": "1.1.0", "description": "Node.js isolated-vm sandbox driver for TanStack AI Code Mode TypeScript execution.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-isolate-quickjs-bun/CHANGELOG.md b/packages/ai-isolate-quickjs-bun/CHANGELOG.md index 877bd5b251..91856d0088 100644 --- a/packages/ai-isolate-quickjs-bun/CHANGELOG.md +++ b/packages/ai-isolate-quickjs-bun/CHANGELOG.md @@ -1,5 +1,16 @@ # @tanstack/ai-isolate-quickjs-bun +## 1.1.0 + +### Minor Changes + +- [#1978](https://github.com/TanStack/ai/pull/1978) [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32) - Stop a run when the `execute()` signal aborts. The run returns an `AbortError` failure. The context stays usable. + +### Patch Changes + +- Updated dependencies [[`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32)]: + - @tanstack/ai-code-mode@1.1.0 + ## 1.0.0 ### Major Changes diff --git a/packages/ai-isolate-quickjs-bun/package.json b/packages/ai-isolate-quickjs-bun/package.json index 8f4627b62d..5e2536eb73 100644 --- a/packages/ai-isolate-quickjs-bun/package.json +++ b/packages/ai-isolate-quickjs-bun/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-isolate-quickjs-bun", - "version": "1.0.0", + "version": "1.1.0", "description": "Native QuickJS sandbox driver for TanStack AI Code Mode TypeScript execution on Bun via bun:ffi.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-isolate-quickjs/CHANGELOG.md b/packages/ai-isolate-quickjs/CHANGELOG.md index d52d33fdfb..954465fdde 100644 --- a/packages/ai-isolate-quickjs/CHANGELOG.md +++ b/packages/ai-isolate-quickjs/CHANGELOG.md @@ -1,5 +1,16 @@ # @tanstack/ai-isolate-quickjs +## 1.1.0 + +### Minor Changes + +- [#1978](https://github.com/TanStack/ai/pull/1978) [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32) - Stop a run when the `execute()` signal aborts. The run returns an `AbortError` failure, and the context is disposed, the same as after a timeout. + +### Patch Changes + +- Updated dependencies [[`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32)]: + - @tanstack/ai-code-mode@1.1.0 + ## 1.0.0 ### Major Changes diff --git a/packages/ai-isolate-quickjs/package.json b/packages/ai-isolate-quickjs/package.json index 4be89d5ea4..14184ea057 100644 --- a/packages/ai-isolate-quickjs/package.json +++ b/packages/ai-isolate-quickjs/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-isolate-quickjs", - "version": "1.0.0", + "version": "1.1.0", "description": "QuickJS WASM sandbox driver for TanStack AI Code Mode TypeScript execution across runtimes.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-lovable/CHANGELOG.md b/packages/ai-lovable/CHANGELOG.md index b14d3602be..4742f12428 100644 --- a/packages/ai-lovable/CHANGELOG.md +++ b/packages/ai-lovable/CHANGELOG.md @@ -1,5 +1,27 @@ # @tanstack/ai-lovable +## 1.1.0 + +### Minor Changes + +- [#1977](https://github.com/TanStack/ai/pull/1977) [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6) - Forward the new optional `abortSignal` in embeddings and in video status and download. + +### Patch Changes + +- [#1974](https://github.com/TanStack/ai/pull/1974) [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb) - 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`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`e17cae7`](https://github.com/TanStack/ai/commit/e17cae7aa40ce5ebe0e78496931d49c793bdaf41), [`d6ead13`](https://github.com/TanStack/ai/commit/d6ead13def85f91782e20d6c1b8755fdf1c836c2), [`450950d`](https://github.com/TanStack/ai/commit/450950da860d58047c654c1497ddb48d651f9076), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`13b1ca9`](https://github.com/TanStack/ai/commit/13b1ca918a0ac36761db2a6226973c5330d4221d), [`e17cae7`](https://github.com/TanStack/ai/commit/e17cae7aa40ce5ebe0e78496931d49c793bdaf41), [`940c402`](https://github.com/TanStack/ai/commit/940c402d8ca5220e3202326e03cc1f64654572a3), [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb)]: + - @tanstack/ai@1.1.0 + - @tanstack/ai-utils@1.0.1 + - @tanstack/openai-base@1.0.1 + ## 1.0.1 ### Patch Changes diff --git a/packages/ai-lovable/package.json b/packages/ai-lovable/package.json index 2a4d90ebf3..87e8c4b78f 100644 --- a/packages/ai-lovable/package.json +++ b/packages/ai-lovable/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-lovable", - "version": "1.0.1", + "version": "1.1.0", "description": "Lovable AI Gateway adapter for TanStack AI chat, embeddings, image, video, speech, and transcription.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-mcp/CHANGELOG.md b/packages/ai-mcp/CHANGELOG.md index f115178875..b4876da466 100644 --- a/packages/ai-mcp/CHANGELOG.md +++ b/packages/ai-mcp/CHANGELOG.md @@ -1,5 +1,25 @@ # @tanstack/ai-mcp +## 1.1.0 + +### Minor Changes + +- [#1978](https://github.com/TanStack/ai/pull/1978) [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32) - New optional signals. Old calls work the same. + - `createMCPClient({ signal })` cancels the connect handshake. + - `tools({ signal })`, `resources({ signal })`, `readResource(uri, { signal })`, `resourceTemplates({ signal })`, `prompts({ signal })`, and `getPrompt(name, args, { signal })` send the signal to the MCP SDK. + - The lazy tool list in `callTool` uses the signal of the call. + - The handler from `createMcpAppCallHandler` takes `(req, { signal })` and passes it to the connect, the tool list, and the tool call. + +### Patch Changes + +- [#1976](https://github.com/TanStack/ai/pull/1976) [`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960) - `createMCPServer` now answers `tasks/cancel` for an `execution: 'task'` tool on spec 2025. The task status becomes `cancelled`, `ctx.abortSignal` of the tool aborts, and a late result does not replace the cancel. A spec 2025 `elicitation/create` that the server cancels now also stops the question in the harness. + +- [#1930](https://github.com/TanStack/ai/pull/1930) [`c7a1b4d`](https://github.com/TanStack/ai/commit/c7a1b4d4ee223add367715bac8fd1150a0c71fcd) - `serveMCPStdio` no longer holds a request behind a running request. A `ping` or a fast tool call sent during a slow tool call now gets its answer at once. Requests still wait for an `initialize` that is in flight, because it sets the session id. + +- Updated dependencies [[`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32), [`d6ead13`](https://github.com/TanStack/ai/commit/d6ead13def85f91782e20d6c1b8755fdf1c836c2), [`450950d`](https://github.com/TanStack/ai/commit/450950da860d58047c654c1497ddb48d651f9076), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`13b1ca9`](https://github.com/TanStack/ai/commit/13b1ca918a0ac36761db2a6226973c5330d4221d), [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb)]: + - @tanstack/ai-harness@0.2.0 + - @tanstack/ai@1.1.0 + ## 1.0.0 ### Major Changes diff --git a/packages/ai-mcp/package.json b/packages/ai-mcp/package.json index fca382af0b..934dc6fbd7 100644 --- a/packages/ai-mcp/package.json +++ b/packages/ai-mcp/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-mcp", - "version": "1.0.0", + "version": "1.1.0", "description": "Host-side Model Context Protocol client for TanStack AI: discover and run MCP server tools, resources, and prompts in any adapter's chat() loop, with generated end-to-end types.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-memory/CHANGELOG.md b/packages/ai-memory/CHANGELOG.md index 017312e1fe..021d305416 100644 --- a/packages/ai-memory/CHANGELOG.md +++ b/packages/ai-memory/CHANGELOG.md @@ -1,5 +1,21 @@ # @tanstack/ai-memory +## 1.1.0 + +### Minor Changes + +- [#1978](https://github.com/TanStack/ai/pull/1978) [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32) - The `hindsight_retain`, `hindsight_recall`, and `hindsight_reflect` tools now give the abort signal of the call to the Hindsight client. + +- [#1978](https://github.com/TanStack/ai/pull/1978) [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32) - `MemoryAdapter.recall(scope, query, { signal })` and `Embedder.embed(text, { signal })` take an optional signal. `memoryMiddleware` passes the chat run signal. `inMemory()`, `redis()`, and `mem0()` forward it. + +- [#1978](https://github.com/TanStack/ai/pull/1978) [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32) - The Hindsight adapter passes the `recall()` signal to `client.recall`. The Honcho adapter stops waiting when the signal aborts. The Honcho SDK takes no signal, so its request continues in the background. + +### Patch Changes + +- Updated dependencies [[`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`d6ead13`](https://github.com/TanStack/ai/commit/d6ead13def85f91782e20d6c1b8755fdf1c836c2), [`450950d`](https://github.com/TanStack/ai/commit/450950da860d58047c654c1497ddb48d651f9076), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`13b1ca9`](https://github.com/TanStack/ai/commit/13b1ca918a0ac36761db2a6226973c5330d4221d), [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb)]: + - @tanstack/ai@1.1.0 + - @tanstack/ai-event-client@1.0.1 + ## 1.0.0 ### Major Changes diff --git a/packages/ai-memory/package.json b/packages/ai-memory/package.json index a6512b1916..b1046d74c4 100644 --- a/packages/ai-memory/package.json +++ b/packages/ai-memory/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-memory", - "version": "1.0.0", + "version": "1.1.0", "description": "Pluggable memory adapters for TanStack AI memoryMiddleware", "author": "", "license": "MIT", diff --git a/packages/ai-mistral/CHANGELOG.md b/packages/ai-mistral/CHANGELOG.md index 9450226a96..69b97519fa 100644 --- a/packages/ai-mistral/CHANGELOG.md +++ b/packages/ai-mistral/CHANGELOG.md @@ -1,5 +1,32 @@ # @tanstack/ai-mistral +## 1.1.0 + +### Minor Changes + +- [#1977](https://github.com/TanStack/ai/pull/1977) [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6) - Forward the new optional embedding `abortSignal` to the embeddings request. + +### Patch Changes + +- [#1975](https://github.com/TanStack/ai/pull/1975) [`c7f8dfd`](https://github.com/TanStack/ai/commit/c7f8dfd58129c5538090fc9ab8c91cd93c6125ab) - Aborting a chat now cancels the request to Mistral, for streaming and for structured output. Structured output keeps the `timeoutMs` limit when you pass a signal. + +- [#1925](https://github.com/TanStack/ai/pull/1925) [`77318d2`](https://github.com/TanStack/ai/commit/77318d2369e63ff6670ae2defe7243f0d109a410) - Parallel tool calls that arrive whole with the same `index` (the Mistral SDK fills a missing `index` with 0) are no longer merged into one call with a combined name and invalid JSON arguments. A tool call delta whose id differs from the one already in its slot now starts a new call. + +- [#1957](https://github.com/TanStack/ai/pull/1957) [`7f64043`](https://github.com/TanStack/ai/commit/7f640439592ada1c1d870836e9880bb1a167bd1c) - Fix the README usage examples: they imported `generate` (and `generateImages` for Grok) from `@tanstack/ai`, which do not exist. They now use `chat({ stream: false })` and `generateImage`. + +- [#1974](https://github.com/TanStack/ai/pull/1974) [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb) - 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`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`e17cae7`](https://github.com/TanStack/ai/commit/e17cae7aa40ce5ebe0e78496931d49c793bdaf41), [`d6ead13`](https://github.com/TanStack/ai/commit/d6ead13def85f91782e20d6c1b8755fdf1c836c2), [`450950d`](https://github.com/TanStack/ai/commit/450950da860d58047c654c1497ddb48d651f9076), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`13b1ca9`](https://github.com/TanStack/ai/commit/13b1ca918a0ac36761db2a6226973c5330d4221d), [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb)]: + - @tanstack/ai@1.1.0 + - @tanstack/ai-utils@1.0.1 + ## 1.0.0 ### Major Changes diff --git a/packages/ai-mistral/package.json b/packages/ai-mistral/package.json index 790545f845..c249ff259e 100644 --- a/packages/ai-mistral/package.json +++ b/packages/ai-mistral/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-mistral", - "version": "1.0.0", + "version": "1.1.0", "type": "module", "description": "Mistral adapter for TanStack AI", "author": "", diff --git a/packages/ai-neon/CHANGELOG.md b/packages/ai-neon/CHANGELOG.md index 8feade8409..ef5c68ddde 100644 --- a/packages/ai-neon/CHANGELOG.md +++ b/packages/ai-neon/CHANGELOG.md @@ -1,5 +1,19 @@ # @tanstack/ai-neon +## 0.2.0 + +### Minor Changes + +- [#1977](https://github.com/TanStack/ai/pull/1977) [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6) - Forward the new optional embedding `abortSignal` to the embeddings request. + +### Patch Changes + +- Updated dependencies [[`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`e17cae7`](https://github.com/TanStack/ai/commit/e17cae7aa40ce5ebe0e78496931d49c793bdaf41), [`d6ead13`](https://github.com/TanStack/ai/commit/d6ead13def85f91782e20d6c1b8755fdf1c836c2), [`450950d`](https://github.com/TanStack/ai/commit/450950da860d58047c654c1497ddb48d651f9076), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`13b1ca9`](https://github.com/TanStack/ai/commit/13b1ca918a0ac36761db2a6226973c5330d4221d), [`e17cae7`](https://github.com/TanStack/ai/commit/e17cae7aa40ce5ebe0e78496931d49c793bdaf41), [`940c402`](https://github.com/TanStack/ai/commit/940c402d8ca5220e3202326e03cc1f64654572a3), [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb)]: + - @tanstack/ai@1.1.0 + - @tanstack/ai-anthropic@1.1.0 + - @tanstack/ai-utils@1.0.1 + - @tanstack/openai-base@1.0.1 + ## 0.1.0 ### Minor Changes diff --git a/packages/ai-neon/package.json b/packages/ai-neon/package.json index 11ccf2d5a0..7d26f97ca0 100644 --- a/packages/ai-neon/package.json +++ b/packages/ai-neon/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-neon", - "version": "0.1.0", + "version": "0.2.0", "description": "Neon AI Gateway adapter for TanStack AI chat, embeddings, and summarization.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-ollama/CHANGELOG.md b/packages/ai-ollama/CHANGELOG.md index bc04d7038d..35ab66c268 100644 --- a/packages/ai-ollama/CHANGELOG.md +++ b/packages/ai-ollama/CHANGELOG.md @@ -1,5 +1,30 @@ # @tanstack/ai-ollama +## 1.1.0 + +### Minor Changes + +- [#1977](https://github.com/TanStack/ai/pull/1977) [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6) - Forward the new optional embedding `abortSignal` to the embed request. An injected `Ollama` client cannot take a per-call signal, so `embed()` only rejects on abort for it. + +### Patch Changes + +- [#1975](https://github.com/TanStack/ai/pull/1975) [`c7f8dfd`](https://github.com/TanStack/ai/commit/c7f8dfd58129c5538090fc9ab8c91cd93c6125ab) - Aborting a chat now stops the Ollama stream when you pass your own `Ollama` client. Structured output with your own client still runs to the end, because `ollama` has no per-call signal. + +- [#1932](https://github.com/TanStack/ai/pull/1932) [`3ce3085`](https://github.com/TanStack/ai/commit/3ce3085d674fc068e4d45b8699eccb17b886aa6c) - Keep parallel calls to the same tool apart when Ollama sends no tool-call id. The fallback id was `_`, so two calls to one tool in the same millisecond shared an id and the second call was merged into the first instead of running. The fallback id is now unique per call. + +- [#1974](https://github.com/TanStack/ai/pull/1974) [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb) - 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`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`e17cae7`](https://github.com/TanStack/ai/commit/e17cae7aa40ce5ebe0e78496931d49c793bdaf41), [`d6ead13`](https://github.com/TanStack/ai/commit/d6ead13def85f91782e20d6c1b8755fdf1c836c2), [`450950d`](https://github.com/TanStack/ai/commit/450950da860d58047c654c1497ddb48d651f9076), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`13b1ca9`](https://github.com/TanStack/ai/commit/13b1ca918a0ac36761db2a6226973c5330d4221d), [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb)]: + - @tanstack/ai@1.1.0 + - @tanstack/ai-utils@1.0.1 + ## 1.0.1 ### Patch Changes diff --git a/packages/ai-ollama/package.json b/packages/ai-ollama/package.json index a91a0d3978..3712881d91 100644 --- a/packages/ai-ollama/package.json +++ b/packages/ai-ollama/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-ollama", - "version": "1.0.1", + "version": "1.1.0", "description": "Ollama adapter for TanStack AI local LLM chat, tool calling, and structured outputs.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-openai/CHANGELOG.md b/packages/ai-openai/CHANGELOG.md index a6e950eaa6..fde4fd7bb6 100644 --- a/packages/ai-openai/CHANGELOG.md +++ b/packages/ai-openai/CHANGELOG.md @@ -1,5 +1,29 @@ # @tanstack/ai-openai +## 1.1.0 + +### Minor Changes + +- [#1977](https://github.com/TanStack/ai/pull/1977) [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6) - Forward the new optional `abortSignal` to the provider request in embeddings, video status and download, files upload/get/delete, the realtime token request, and the realtime WebRTC SDP request. + +### Patch Changes + +- [#1975](https://github.com/TanStack/ai/pull/1975) [`c7f8dfd`](https://github.com/TanStack/ai/commit/c7f8dfd58129c5538090fc9ab8c91cd93c6125ab) - Aborting `generateImage()`, `generateSpeech()`, `generateTranscription()` or `generateVideo()` now stops the OpenAI request. Before, the call rejected but the request kept running and was billed. This also covers the image fetch for an `allowUrlFetch` image input. + +- [#1974](https://github.com/TanStack/ai/pull/1974) [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb) - 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`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`e17cae7`](https://github.com/TanStack/ai/commit/e17cae7aa40ce5ebe0e78496931d49c793bdaf41), [`d6ead13`](https://github.com/TanStack/ai/commit/d6ead13def85f91782e20d6c1b8755fdf1c836c2), [`450950d`](https://github.com/TanStack/ai/commit/450950da860d58047c654c1497ddb48d651f9076), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`13b1ca9`](https://github.com/TanStack/ai/commit/13b1ca918a0ac36761db2a6226973c5330d4221d), [`e17cae7`](https://github.com/TanStack/ai/commit/e17cae7aa40ce5ebe0e78496931d49c793bdaf41), [`940c402`](https://github.com/TanStack/ai/commit/940c402d8ca5220e3202326e03cc1f64654572a3), [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb)]: + - @tanstack/ai@1.1.0 + - @tanstack/ai-utils@1.0.1 + - @tanstack/openai-base@1.0.1 + ## 1.0.1 ### Patch Changes diff --git a/packages/ai-openai/package.json b/packages/ai-openai/package.json index 49873788dc..14f807077c 100644 --- a/packages/ai-openai/package.json +++ b/packages/ai-openai/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-openai", - "version": "1.0.1", + "version": "1.1.0", "description": "OpenAI adapter for TanStack AI chat, tools, images, video, speech, transcription, realtime, and structured outputs.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-opencode/CHANGELOG.md b/packages/ai-opencode/CHANGELOG.md index 523ed1cbb9..54ccea0ab5 100644 --- a/packages/ai-opencode/CHANGELOG.md +++ b/packages/ai-opencode/CHANGELOG.md @@ -1,5 +1,22 @@ # @tanstack/ai-opencode +## 1.0.1 + +### Patch Changes + +- [#1974](https://github.com/TanStack/ai/pull/1974) [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb) - 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 [[`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32), [`d6ead13`](https://github.com/TanStack/ai/commit/d6ead13def85f91782e20d6c1b8755fdf1c836c2), [`450950d`](https://github.com/TanStack/ai/commit/450950da860d58047c654c1497ddb48d651f9076), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`13b1ca9`](https://github.com/TanStack/ai/commit/13b1ca918a0ac36761db2a6226973c5330d4221d), [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb)]: + - @tanstack/ai-sandbox@1.1.0 + - @tanstack/ai@1.1.0 + ## 1.0.0 ### Major Changes diff --git a/packages/ai-opencode/package.json b/packages/ai-opencode/package.json index 57a67539c4..28f1f3143a 100644 --- a/packages/ai-opencode/package.json +++ b/packages/ai-opencode/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-opencode", - "version": "1.0.0", + "version": "1.0.1", "description": "OpenCode harness adapter for TanStack AI — run OpenCode as a chat backend with local tool execution and stateful sessions.", "author": "", "license": "MIT", diff --git a/packages/ai-openrouter/CHANGELOG.md b/packages/ai-openrouter/CHANGELOG.md index 8b14884005..89b3c283f1 100644 --- a/packages/ai-openrouter/CHANGELOG.md +++ b/packages/ai-openrouter/CHANGELOG.md @@ -1,5 +1,30 @@ # @tanstack/ai-openrouter +## 1.1.0 + +### Minor Changes + +- [#1977](https://github.com/TanStack/ai/pull/1977) [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6) - Forward the new optional `abortSignal` of `getVideoStatus` and `getVideo` to the generation lookup and the content download. + +### Patch Changes + +- [#1975](https://github.com/TanStack/ai/pull/1975) [`c7f8dfd`](https://github.com/TanStack/ai/commit/c7f8dfd58129c5538090fc9ab8c91cd93c6125ab) - Aborting an image or video call now cancels the OpenRouter request. Before, the request kept running and was billed. + +- [#1966](https://github.com/TanStack/ai/pull/1966) [`e17cae7`](https://github.com/TanStack/ai/commit/e17cae7aa40ce5ebe0e78496931d49c793bdaf41) - Stop the OpenRouter Responses adapter from cancelling a finished request. After `response.completed` the adapter stopped reading at once, which cancelled the SDK's event stream and the fetch body, so a gateway such as Cloudflare AI Gateway logged a billed, complete call as a client cancel (499). The adapter now lets the body end by itself for up to 250 ms and cancels it only after that. + +- [#1974](https://github.com/TanStack/ai/pull/1974) [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb) - 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`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`e17cae7`](https://github.com/TanStack/ai/commit/e17cae7aa40ce5ebe0e78496931d49c793bdaf41), [`d6ead13`](https://github.com/TanStack/ai/commit/d6ead13def85f91782e20d6c1b8755fdf1c836c2), [`450950d`](https://github.com/TanStack/ai/commit/450950da860d58047c654c1497ddb48d651f9076), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`13b1ca9`](https://github.com/TanStack/ai/commit/13b1ca918a0ac36761db2a6226973c5330d4221d), [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb)]: + - @tanstack/ai@1.1.0 + - @tanstack/ai-utils@1.0.1 + ## 1.0.1 ### Patch Changes diff --git a/packages/ai-openrouter/package.json b/packages/ai-openrouter/package.json index ec5d61f196..c113ab39a1 100644 --- a/packages/ai-openrouter/package.json +++ b/packages/ai-openrouter/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-openrouter", - "version": "1.0.1", + "version": "1.1.0", "description": "TanStack AI adapter for OpenRouter chat, provider tools, structured outputs, and access to hundreds of LLMs.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-react/CHANGELOG.md b/packages/ai-react/CHANGELOG.md index 5066a215c2..dcbe34b9c2 100644 --- a/packages/ai-react/CHANGELOG.md +++ b/packages/ai-react/CHANGELOG.md @@ -1,5 +1,15 @@ # @tanstack/ai-react +## 1.0.2 + +### Patch Changes + +- [#1899](https://github.com/TanStack/ai/pull/1899) [`68d0b60`](https://github.com/TanStack/ai/commit/68d0b60d53fa39c2f41f3bcd0548e84c982f37cd) - `useChat` keeps working in a view hidden by React's ``. Hiding runs the hook's effect cleanups, and the deferred teardown disposed the client while React kept the hook, so the view came back with a dead client: a reply in flight never resumed and the thread did not load again. When the view shows again, `useChat` now replaces the disposed client with a new one that starts from the messages on screen, loads the thread and rejoins its run. + +- Updated dependencies [[`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`d6ead13`](https://github.com/TanStack/ai/commit/d6ead13def85f91782e20d6c1b8755fdf1c836c2), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`1e13e87`](https://github.com/TanStack/ai/commit/1e13e87b26ccd2734455fc4a958c0690ef3ead06), [`450950d`](https://github.com/TanStack/ai/commit/450950da860d58047c654c1497ddb48d651f9076), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`13b1ca9`](https://github.com/TanStack/ai/commit/13b1ca918a0ac36761db2a6226973c5330d4221d), [`f33f72a`](https://github.com/TanStack/ai/commit/f33f72ab6da9a0f95bd912e29d2cabc2eab17f27), [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb)]: + - @tanstack/ai@1.1.0 + - @tanstack/ai-client@1.1.0 + ## 1.0.1 ### Patch Changes diff --git a/packages/ai-react/package.json b/packages/ai-react/package.json index 9f8f6ac1f5..484ad847d8 100644 --- a/packages/ai-react/package.json +++ b/packages/ai-react/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-react", - "version": "1.0.1", + "version": "1.0.2", "description": "React hooks for TanStack AI streaming chat, realtime voice, structured outputs, and media generation.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-sandbox-blaxel/CHANGELOG.md b/packages/ai-sandbox-blaxel/CHANGELOG.md index 443bb3879f..c07dfad59c 100644 --- a/packages/ai-sandbox-blaxel/CHANGELOG.md +++ b/packages/ai-sandbox-blaxel/CHANGELOG.md @@ -1,5 +1,16 @@ # @tanstack/ai-sandbox-blaxel +## 1.1.0 + +### Minor Changes + +- [#1978](https://github.com/TanStack/ai/pull/1978) [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32) - Pass the `git.push` and `git.pull` signal to the git command. + +### Patch Changes + +- Updated dependencies [[`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32)]: + - @tanstack/ai-sandbox@1.1.0 + ## 1.0.0 ### Major Changes diff --git a/packages/ai-sandbox-blaxel/package.json b/packages/ai-sandbox-blaxel/package.json index 328b530335..077f54764a 100644 --- a/packages/ai-sandbox-blaxel/package.json +++ b/packages/ai-sandbox-blaxel/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-sandbox-blaxel", - "version": "1.0.0", + "version": "1.1.0", "description": "Blaxel sandbox provider for TanStack AI — run harness adapters inside isolated Blaxel cloud sandboxes through the uniform SandboxHandle.", "author": "", "license": "MIT", diff --git a/packages/ai-sandbox-boxd/CHANGELOG.md b/packages/ai-sandbox-boxd/CHANGELOG.md index 1e31981115..f794aded85 100644 --- a/packages/ai-sandbox-boxd/CHANGELOG.md +++ b/packages/ai-sandbox-boxd/CHANGELOG.md @@ -1,5 +1,16 @@ # @tanstack/ai-sandbox-boxd +## 1.1.0 + +### Minor Changes + +- [#1978](https://github.com/TanStack/ai/pull/1978) [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32) - When the `snapshot` signal aborts, `snapshot` stops polling for the capture. When the `fork` signal aborts, `fork` stops waiting for the new machine and deletes it. The boxd SDK takes no signal, so a started capture continues in boxd. + +### Patch Changes + +- Updated dependencies [[`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32)]: + - @tanstack/ai-sandbox@1.1.0 + ## 1.0.0 ### Major Changes diff --git a/packages/ai-sandbox-boxd/package.json b/packages/ai-sandbox-boxd/package.json index a556ffdb47..09d53c9652 100644 --- a/packages/ai-sandbox-boxd/package.json +++ b/packages/ai-sandbox-boxd/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-sandbox-boxd", - "version": "1.0.0", + "version": "1.1.0", "description": "boxd sandbox provider for TanStack AI — run harness adapters inside isolated boxd KVM microVMs through the uniform SandboxHandle.", "author": "", "license": "MIT", diff --git a/packages/ai-sandbox-daytona/CHANGELOG.md b/packages/ai-sandbox-daytona/CHANGELOG.md index 4317a0f6f4..6877436dad 100644 --- a/packages/ai-sandbox-daytona/CHANGELOG.md +++ b/packages/ai-sandbox-daytona/CHANGELOG.md @@ -1,5 +1,16 @@ # @tanstack/ai-sandbox-daytona +## 1.0.1 + +### Patch Changes + +- [#1976](https://github.com/TanStack/ai/pull/1976) [`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960) - `create` and `restoreSnapshot` now delete a sandbox that the SDK makes after the signal aborted. Before, that sandbox kept running with no owner. + +- [#1954](https://github.com/TanStack/ai/pull/1954) [`41f464d`](https://github.com/TanStack/ai/commit/41f464d6c2a179ba25253dc54337237e59ac4d61) - Daytona now reports `writableStdin: false`. The session API cannot close a command's stdin, so `stdin.end()` never sent EOF and stdin-fed harnesses (Claude Code, Codex) hung forever. They now get the prompt from a file redirect instead. + +- Updated dependencies [[`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32)]: + - @tanstack/ai-sandbox@1.1.0 + ## 1.0.0 ### Major Changes diff --git a/packages/ai-sandbox-daytona/package.json b/packages/ai-sandbox-daytona/package.json index 2bd3434d2d..4296c03c09 100644 --- a/packages/ai-sandbox-daytona/package.json +++ b/packages/ai-sandbox-daytona/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-sandbox-daytona", - "version": "1.0.0", + "version": "1.0.1", "description": "Daytona sandbox provider for TanStack AI — run harness adapters inside isolated Daytona cloud sandboxes through the uniform SandboxHandle.", "author": "", "license": "MIT", diff --git a/packages/ai-sandbox-docker/CHANGELOG.md b/packages/ai-sandbox-docker/CHANGELOG.md index 8a9c0c8da1..ef7d4463fe 100644 --- a/packages/ai-sandbox-docker/CHANGELOG.md +++ b/packages/ai-sandbox-docker/CHANGELOG.md @@ -1,5 +1,16 @@ # @tanstack/ai-sandbox-docker +## 1.1.0 + +### Minor Changes + +- [#1978](https://github.com/TanStack/ai/pull/1978) [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32) - `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 + +- Updated dependencies [[`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32)]: + - @tanstack/ai-sandbox@1.1.0 + ## 1.0.0 ### Major Changes diff --git a/packages/ai-sandbox-docker/package.json b/packages/ai-sandbox-docker/package.json index ba231b39d0..c505666039 100644 --- a/packages/ai-sandbox-docker/package.json +++ b/packages/ai-sandbox-docker/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-sandbox-docker", - "version": "1.0.0", + "version": "1.1.0", "description": "Docker sandbox providers for TanStack AI — dockerSandbox() runs a container; sbxSandbox() runs a Docker Sandboxes microVM.", "author": "", "license": "MIT", diff --git a/packages/ai-sandbox-e2b/CHANGELOG.md b/packages/ai-sandbox-e2b/CHANGELOG.md index 9cafed7282..eaf1578be8 100644 --- a/packages/ai-sandbox-e2b/CHANGELOG.md +++ b/packages/ai-sandbox-e2b/CHANGELOG.md @@ -1,5 +1,16 @@ # @tanstack/ai-sandbox-e2b +## 1.1.0 + +### Minor Changes + +- [#1978](https://github.com/TanStack/ai/pull/1978) [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32) - `snapshot(label, { signal })` and `fork({ signal })` pass the signal to the E2B SDK, which aborts the request. + +### Patch Changes + +- Updated dependencies [[`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32)]: + - @tanstack/ai-sandbox@1.1.0 + ## 1.0.0 ### Major Changes diff --git a/packages/ai-sandbox-e2b/package.json b/packages/ai-sandbox-e2b/package.json index 524a0e0916..ca98802358 100644 --- a/packages/ai-sandbox-e2b/package.json +++ b/packages/ai-sandbox-e2b/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-sandbox-e2b", - "version": "1.0.0", + "version": "1.1.0", "description": "E2B sandbox provider for TanStack AI — run harness adapters inside isolated E2B cloud sandboxes through the uniform SandboxHandle.", "author": "", "license": "MIT", diff --git a/packages/ai-sandbox-sprites/CHANGELOG.md b/packages/ai-sandbox-sprites/CHANGELOG.md index a3c1cb6e3e..5f7aa7aac0 100644 --- a/packages/ai-sandbox-sprites/CHANGELOG.md +++ b/packages/ai-sandbox-sprites/CHANGELOG.md @@ -1,5 +1,16 @@ # @tanstack/ai-sandbox-sprites +## 1.1.0 + +### Minor Changes + +- [#1978](https://github.com/TanStack/ai/pull/1978) [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32) - `snapshot(label, { signal })` passes the signal to the checkpoint request. + +### Patch Changes + +- Updated dependencies [[`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32)]: + - @tanstack/ai-sandbox@1.1.0 + ## 1.0.0 ### Major Changes diff --git a/packages/ai-sandbox-sprites/package.json b/packages/ai-sandbox-sprites/package.json index b0543c478e..b431b47d96 100644 --- a/packages/ai-sandbox-sprites/package.json +++ b/packages/ai-sandbox-sprites/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-sandbox-sprites", - "version": "1.0.0", + "version": "1.1.0", "description": "Sprites sandbox provider for TanStack AI — run harness adapters inside isolated Fly.io Sprite stateful sandboxes through the uniform SandboxHandle.", "author": "", "license": "MIT", diff --git a/packages/ai-sandbox-vercel/CHANGELOG.md b/packages/ai-sandbox-vercel/CHANGELOG.md index bffcb9569b..fafb43f4c3 100644 --- a/packages/ai-sandbox-vercel/CHANGELOG.md +++ b/packages/ai-sandbox-vercel/CHANGELOG.md @@ -1,5 +1,14 @@ # @tanstack/ai-sandbox-vercel +## 1.0.1 + +### Patch Changes + +- [#1976](https://github.com/TanStack/ai/pull/1976) [`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960) - `create` now stops a sandbox that comes after the signal aborted. Before, that sandbox kept running with no owner. + +- Updated dependencies [[`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32)]: + - @tanstack/ai-sandbox@1.1.0 + ## 1.0.0 ### Major Changes diff --git a/packages/ai-sandbox-vercel/package.json b/packages/ai-sandbox-vercel/package.json index 430cef17be..e875022ffa 100644 --- a/packages/ai-sandbox-vercel/package.json +++ b/packages/ai-sandbox-vercel/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-sandbox-vercel", - "version": "1.0.0", + "version": "1.0.1", "description": "Vercel Sandbox provider for TanStack AI — run harness adapters inside isolated Vercel microVM sandboxes through the uniform SandboxHandle.", "author": "", "license": "MIT", diff --git a/packages/ai-sandbox/CHANGELOG.md b/packages/ai-sandbox/CHANGELOG.md index 1b1aae5dcf..91e5f0d6e9 100644 --- a/packages/ai-sandbox/CHANGELOG.md +++ b/packages/ai-sandbox/CHANGELOG.md @@ -1,5 +1,24 @@ # @tanstack/ai-sandbox +## 1.1.0 + +### Minor Changes + +- [#1978](https://github.com/TanStack/ai/pull/1978) [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32) - New optional signals on the sandbox contract: `git.clone({ signal })`, `git.push(dir, { signal })`, `git.pull(dir, { signal })`, `snapshot(label, { signal })`, `fork({ signal })`, and `ports.connect(port, { signal })`. The exec-backed git passes the signal to each git command. + +- [#1978](https://github.com/TanStack/ai/pull/1978) [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32) - `ToolBridgeCore.callTool(name, args, { signal })` takes an optional signal for one call. The tool gets a signal that aborts when this signal or the bridge `signal` aborts. The host MCP bridge passes the request signal, so a closed `tools/call` request stops the bridged tool. + +### Patch Changes + +- [#1976](https://github.com/TanStack/ai/pull/1976) [`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960) - `spawnNdjson` now kills the agent process when the consumer stops reading early. The `save_sandbox_snapshot` tool now gives the abort signal of the call to `snapshots.save`. + +- Updated dependencies [[`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32), [`e17cae7`](https://github.com/TanStack/ai/commit/e17cae7aa40ce5ebe0e78496931d49c793bdaf41), [`d6ead13`](https://github.com/TanStack/ai/commit/d6ead13def85f91782e20d6c1b8755fdf1c836c2), [`450950d`](https://github.com/TanStack/ai/commit/450950da860d58047c654c1497ddb48d651f9076), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`13b1ca9`](https://github.com/TanStack/ai/commit/13b1ca918a0ac36761db2a6226973c5330d4221d), [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb)]: + - @tanstack/ai-harness@0.2.0 + - @tanstack/ai@1.1.0 + - @tanstack/ai-utils@1.0.1 + - @tanstack/ai-skills@1.0.1 + - @tanstack/ai-persistence@1.0.1 + ## 1.0.0 ### Major Changes diff --git a/packages/ai-sandbox/package.json b/packages/ai-sandbox/package.json index 57a6dca4a4..b12dc4361a 100644 --- a/packages/ai-sandbox/package.json +++ b/packages/ai-sandbox/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-sandbox", - "version": "1.0.0", + "version": "1.1.0", "description": "Provider-agnostic sandbox layer for TanStack AI — run harness adapters inside isolated sandboxes (defineSandbox, defineWorkspace, withSandbox) with a uniform SandboxHandle, workspace bootstrap, policy, and resumable lifecycle.", "author": "", "license": "MIT", diff --git a/packages/ai-skills/CHANGELOG.md b/packages/ai-skills/CHANGELOG.md index ffad3ee94f..bb5f27f40a 100644 --- a/packages/ai-skills/CHANGELOG.md +++ b/packages/ai-skills/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/ai-skills +## 1.0.1 + +### Patch Changes + +- Updated dependencies [[`5f62940`](https://github.com/TanStack/ai/commit/5f62940bb15c871a205de70e4e6b58fbe5016960), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32), [`d6ead13`](https://github.com/TanStack/ai/commit/d6ead13def85f91782e20d6c1b8755fdf1c836c2), [`450950d`](https://github.com/TanStack/ai/commit/450950da860d58047c654c1497ddb48d651f9076), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`13b1ca9`](https://github.com/TanStack/ai/commit/13b1ca918a0ac36761db2a6226973c5330d4221d), [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb)]: + - @tanstack/ai-harness@0.2.0 + - @tanstack/ai@1.1.0 + ## 1.0.0 ### Major Changes diff --git a/packages/ai-skills/package.json b/packages/ai-skills/package.json index f46c8709fd..b9c68a3d11 100644 --- a/packages/ai-skills/package.json +++ b/packages/ai-skills/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-skills", - "version": "1.0.0", + "version": "1.0.1", "description": "Portable Agent Skills (SKILL.md) as a first-class chat() middleware for TanStack AI.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-solid/CHANGELOG.md b/packages/ai-solid/CHANGELOG.md index 1c7b495d30..e3b2c37560 100644 --- a/packages/ai-solid/CHANGELOG.md +++ b/packages/ai-solid/CHANGELOG.md @@ -1,5 +1,15 @@ # @tanstack/ai-solid +## 1.0.1 + +### Patch Changes + +- [#1936](https://github.com/TanStack/ai/pull/1936) [`6ed7c64`](https://github.com/TanStack/ai/commit/6ed7c642c6474c4774628dec39aa550a8ef08558) - 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. + +- Updated dependencies [[`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`4caefd7`](https://github.com/TanStack/ai/commit/4caefd7cb6783766fb2bdb9d34d65b367624dd32), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`d6ead13`](https://github.com/TanStack/ai/commit/d6ead13def85f91782e20d6c1b8755fdf1c836c2), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`1e13e87`](https://github.com/TanStack/ai/commit/1e13e87b26ccd2734455fc4a958c0690ef3ead06), [`450950d`](https://github.com/TanStack/ai/commit/450950da860d58047c654c1497ddb48d651f9076), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`13b1ca9`](https://github.com/TanStack/ai/commit/13b1ca918a0ac36761db2a6226973c5330d4221d), [`f33f72a`](https://github.com/TanStack/ai/commit/f33f72ab6da9a0f95bd912e29d2cabc2eab17f27), [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb)]: + - @tanstack/ai@1.1.0 + - @tanstack/ai-client@1.1.0 + ## 1.0.0 ### Major Changes diff --git a/packages/ai-solid/package.json b/packages/ai-solid/package.json index b4c696113a..23005ea3e5 100644 --- a/packages/ai-solid/package.json +++ b/packages/ai-solid/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-solid", - "version": "1.0.0", + "version": "1.0.1", "description": "Solid hooks for TanStack AI streaming chat, structured outputs, and media generation.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-utils/CHANGELOG.md b/packages/ai-utils/CHANGELOG.md index 5eacb8411d..bd040605ee 100644 --- a/packages/ai-utils/CHANGELOG.md +++ b/packages/ai-utils/CHANGELOG.md @@ -1,5 +1,11 @@ # @tanstack/ai-utils +## 1.0.1 + +### Patch Changes + +- [#1966](https://github.com/TanStack/ai/pull/1966) [`e17cae7`](https://github.com/TanStack/ai/commit/e17cae7aa40ce5ebe0e78496931d49c793bdaf41) - 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. + ## 1.0.0 ### Major Changes diff --git a/packages/ai-utils/package.json b/packages/ai-utils/package.json index 30bd601540..dbc48479f4 100644 --- a/packages/ai-utils/package.json +++ b/packages/ai-utils/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-utils", - "version": "1.0.0", + "version": "1.0.1", "description": "Shared TypeScript utilities for TanStack AI provider adapters and runtime packages.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai-vercel-gateway/CHANGELOG.md b/packages/ai-vercel-gateway/CHANGELOG.md index efb4bc400e..411f569fbf 100644 --- a/packages/ai-vercel-gateway/CHANGELOG.md +++ b/packages/ai-vercel-gateway/CHANGELOG.md @@ -1,5 +1,22 @@ # @tanstack/ai-vercel-gateway +## 1.1.0 + +### Minor Changes + +- [#1977](https://github.com/TanStack/ai/pull/1977) [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6) - Forward the new optional embedding `abortSignal` to the embeddings request. + +### Patch Changes + +- [#1975](https://github.com/TanStack/ai/pull/1975) [`c7f8dfd`](https://github.com/TanStack/ai/commit/c7f8dfd58129c5538090fc9ab8c91cd93c6125ab) - Aborting `generateImage()` now stops the Vercel AI Gateway request. Before, the call rejected but the request kept running and was billed. + +- [#1931](https://github.com/TanStack/ai/pull/1931) [`7541699`](https://github.com/TanStack/ai/commit/7541699ae16821ff1a7ae9eab5cbb95b6314b043) - Report the gateway's debited amount (`gatewayCost`, which includes surcharges) as `usage.cost` instead of the inference charge alone. + +- Updated dependencies [[`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`e17cae7`](https://github.com/TanStack/ai/commit/e17cae7aa40ce5ebe0e78496931d49c793bdaf41), [`d6ead13`](https://github.com/TanStack/ai/commit/d6ead13def85f91782e20d6c1b8755fdf1c836c2), [`450950d`](https://github.com/TanStack/ai/commit/450950da860d58047c654c1497ddb48d651f9076), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`13b1ca9`](https://github.com/TanStack/ai/commit/13b1ca918a0ac36761db2a6226973c5330d4221d), [`e17cae7`](https://github.com/TanStack/ai/commit/e17cae7aa40ce5ebe0e78496931d49c793bdaf41), [`940c402`](https://github.com/TanStack/ai/commit/940c402d8ca5220e3202326e03cc1f64654572a3), [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb)]: + - @tanstack/ai@1.1.0 + - @tanstack/ai-utils@1.0.1 + - @tanstack/openai-base@1.0.1 + ## 1.0.0 ### Major Changes diff --git a/packages/ai-vercel-gateway/package.json b/packages/ai-vercel-gateway/package.json index 8632edd103..8282274e2c 100644 --- a/packages/ai-vercel-gateway/package.json +++ b/packages/ai-vercel-gateway/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-vercel-gateway", - "version": "1.0.0", + "version": "1.1.0", "description": "Vercel AI Gateway adapter for TanStack AI chat, embeddings, and image generation.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/ai/CHANGELOG.md b/packages/ai/CHANGELOG.md index 293cd9226c..2b835c93dd 100644 --- a/packages/ai/CHANGELOG.md +++ b/packages/ai/CHANGELOG.md @@ -1,5 +1,44 @@ # @tanstack/ai +## 1.1.0 + +### Minor Changes + +- [#1977](https://github.com/TanStack/ai/pull/1977) [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6) - 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](https://github.com/TanStack/ai/pull/1977) [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6) - 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](https://github.com/TanStack/ai/pull/1962) [`d6ead13`](https://github.com/TanStack/ai/commit/d6ead13def85f91782e20d6c1b8755fdf1c836c2) - 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](https://github.com/TanStack/ai/pull/1968) [`450950d`](https://github.com/TanStack/ai/commit/450950da860d58047c654c1497ddb48d651f9076) - 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](https://github.com/TanStack/ai/pull/1979) [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31) - 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](https://github.com/TanStack/ai/pull/1903) [`13b1ca9`](https://github.com/TanStack/ai/commit/13b1ca918a0ac36761db2a6226973c5330d4221d) - Pass resolved and cancelled MCP input responses to pending server tools when resuming through persistence with an empty incoming message history. + +- [#1974](https://github.com/TanStack/ai/pull/1974) [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb) - 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`](https://github.com/TanStack/ai/commit/e17cae7aa40ce5ebe0e78496931d49c793bdaf41), [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb)]: + - @tanstack/ai-utils@1.0.1 + - @tanstack/ai-event-client@1.0.1 + ## 1.0.1 ### Patch Changes diff --git a/packages/ai/package.json b/packages/ai/package.json index d76beb8a2e..64ed2449bf 100644 --- a/packages/ai/package.json +++ b/packages/ai/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai", - "version": "1.0.1", + "version": "1.1.0", "description": "Type-safe TypeScript AI SDK for streaming chat, tool calling, agents, structured outputs, and multimodal generation.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/openai-base/CHANGELOG.md b/packages/openai-base/CHANGELOG.md index 364f422612..f6c332210f 100644 --- a/packages/openai-base/CHANGELOG.md +++ b/packages/openai-base/CHANGELOG.md @@ -1,5 +1,28 @@ # @tanstack/openai-base +## 1.0.1 + +### Patch Changes + +- [#1966](https://github.com/TanStack/ai/pull/1966) [`e17cae7`](https://github.com/TanStack/ai/commit/e17cae7aa40ce5ebe0e78496931d49c793bdaf41) - 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](https://github.com/TanStack/ai/pull/1948) [`940c402`](https://github.com/TanStack/ai/commit/940c402d8ca5220e3202326e03cc1f64654572a3) - 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](https://github.com/TanStack/ai/pull/1974) [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb) - 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`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`9ac67f3`](https://github.com/TanStack/ai/commit/9ac67f3acbcecee88714503b205d602560fdc8c6), [`e17cae7`](https://github.com/TanStack/ai/commit/e17cae7aa40ce5ebe0e78496931d49c793bdaf41), [`d6ead13`](https://github.com/TanStack/ai/commit/d6ead13def85f91782e20d6c1b8755fdf1c836c2), [`450950d`](https://github.com/TanStack/ai/commit/450950da860d58047c654c1497ddb48d651f9076), [`07d2e42`](https://github.com/TanStack/ai/commit/07d2e429c456a31d35748fecf7d8f8c0795eff31), [`13b1ca9`](https://github.com/TanStack/ai/commit/13b1ca918a0ac36761db2a6226973c5330d4221d), [`09dde65`](https://github.com/TanStack/ai/commit/09dde65b9fdcc312fd0459c98328c23abd1406cb)]: + - @tanstack/ai@1.1.0 + - @tanstack/ai-utils@1.0.1 + ## 1.0.0 ### Major Changes diff --git a/packages/openai-base/package.json b/packages/openai-base/package.json index b2c1097e37..ec88e3080b 100644 --- a/packages/openai-base/package.json +++ b/packages/openai-base/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/openai-base", - "version": "1.0.0", + "version": "1.0.1", "description": "Shared OpenAI SDK base adapters for TanStack AI providers using Chat Completions and Responses APIs.", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/solid-ai-devtools/CHANGELOG.md b/packages/solid-ai-devtools/CHANGELOG.md index bb237125da..5adc809930 100644 --- a/packages/solid-ai-devtools/CHANGELOG.md +++ b/packages/solid-ai-devtools/CHANGELOG.md @@ -1,5 +1,11 @@ # @tanstack/solid-ai-devtools +## 1.0.2 + +### Patch Changes + +- [#1936](https://github.com/TanStack/ai/pull/1936) [`6ed7c64`](https://github.com/TanStack/ai/commit/6ed7c642c6474c4774628dec39aa550a8ef08558) - 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. + ## 1.0.1 ### Patch Changes diff --git a/packages/solid-ai-devtools/package.json b/packages/solid-ai-devtools/package.json index c61a1ec08b..2ee66811c0 100644 --- a/packages/solid-ai-devtools/package.json +++ b/packages/solid-ai-devtools/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/solid-ai-devtools", - "version": "1.0.1", + "version": "1.0.2", "description": "Solid Devtools plugin for inspecting TanStack AI chat messages, tool calls, streams, and errors.", "author": "Tanner Linsley", "license": "MIT",