diff --git a/.changeset/thinking-blocks-per-step.md b/.changeset/thinking-blocks-per-step.md deleted file mode 100644 index 2492acc39..000000000 --- a/.changeset/thinking-blocks-per-step.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -'@tanstack/ai': minor -'@tanstack/ai-anthropic': patch -'@tanstack/ai-client': minor ---- - -**Fix thinking blocks getting merged across steps and lost on turn 2+ of Anthropic tool loops.** - -Each thinking step emitted by the adapter now produces its own `ThinkingPart` on the `UIMessage` instead of being merged into a single part, and thinking content + Anthropic signatures are preserved in server-side message history so multi-turn tool flows with extended thinking work correctly. - -This includes a public callback signature change: `StreamProcessorEvents.onThinkingUpdate` now receives `(messageId, stepId, content)` instead of `(messageId, content)`. `ChatClient` has been updated to handle the new `stepId` argument internally, but consumers implementing `StreamProcessorEvents` directly need to add the new parameter. - -`@tanstack/ai`: - -- `ThinkingPart` gains optional `stepId` and `signature` fields. -- `ModelMessage` gains an optional `thinking?: Array<{ content; signature? }>` field so prior thinking can be replayed in subsequent turns. -- `StepFinishedEvent` gains an optional `signature` field for provider-supplied thinking signatures. -- `StreamProcessor` tracks thinking per-step via `stepId` and keeps step ordering. `getState().thinking` / `getResult().thinking` concatenate step contents in order. -- The `onThinkingUpdate` callback on `StreamProcessorEvents` now receives `(messageId, stepId, content)` — consumers implementing it directly must add the `stepId` parameter. -- `TextEngine` accumulates thinking + signatures per iteration and includes them in assistant messages with tool calls so the next turn can replay them. - -`@tanstack/ai-anthropic`: - -- Captures `signature_delta` stream events and emits the final `STEP_FINISHED` with the signature on `content_block_stop`. -- Includes thinking blocks with signatures in `formatMessages` for multi-turn history. -- Passes `betas: ['interleaved-thinking-2025-05-14']` to the `beta.messages.create` call site when a thinking budget is configured. The beta flag is scoped to the streaming path only, so `structuredOutput` (which uses the non-beta `messages.create` endpoint) is unaffected. - -`@tanstack/ai-client`: - -- `ChatClient`'s internal `onThinkingUpdate` wiring is updated for the new `stepId` parameter. diff --git a/examples/ts-svelte-chat/CHANGELOG.md b/examples/ts-svelte-chat/CHANGELOG.md index 1ee6ccc16..b08f392b8 100644 --- a/examples/ts-svelte-chat/CHANGELOG.md +++ b/examples/ts-svelte-chat/CHANGELOG.md @@ -1,5 +1,18 @@ # ts-svelte-chat +## 0.1.39 + +### Patch Changes + +- Updated dependencies [[`b2d3cc1`](https://github.com/TanStack/ai/commit/b2d3cc131a31c54bd1e5841f958fbe333514e508)]: + - @tanstack/ai@0.15.0 + - @tanstack/ai-anthropic@0.8.4 + - @tanstack/ai-client@0.9.0 + - @tanstack/ai-gemini@0.10.1 + - @tanstack/ai-ollama@0.6.11 + - @tanstack/ai-openai@0.8.3 + - @tanstack/ai-svelte@0.7.1 + ## 0.1.38 ### Patch Changes diff --git a/examples/ts-svelte-chat/package.json b/examples/ts-svelte-chat/package.json index ac08c9575..4374bd000 100644 --- a/examples/ts-svelte-chat/package.json +++ b/examples/ts-svelte-chat/package.json @@ -1,7 +1,7 @@ { "name": "ts-svelte-chat", "private": true, - "version": "0.1.38", + "version": "0.1.39", "type": "module", "scripts": { "dev": "vite dev --port 3000", diff --git a/examples/ts-vue-chat/CHANGELOG.md b/examples/ts-vue-chat/CHANGELOG.md index f7ef62f53..2f133e0b3 100644 --- a/examples/ts-vue-chat/CHANGELOG.md +++ b/examples/ts-vue-chat/CHANGELOG.md @@ -1,5 +1,19 @@ # ts-vue-chat +## 0.1.39 + +### Patch Changes + +- Updated dependencies [[`b2d3cc1`](https://github.com/TanStack/ai/commit/b2d3cc131a31c54bd1e5841f958fbe333514e508)]: + - @tanstack/ai@0.15.0 + - @tanstack/ai-anthropic@0.8.4 + - @tanstack/ai-client@0.9.0 + - @tanstack/ai-gemini@0.10.1 + - @tanstack/ai-ollama@0.6.11 + - @tanstack/ai-openai@0.8.3 + - @tanstack/ai-vue@0.7.1 + - @tanstack/ai-vue-ui@0.1.32 + ## 0.1.38 ### Patch Changes diff --git a/examples/ts-vue-chat/package.json b/examples/ts-vue-chat/package.json index 98bd4151c..2001d0398 100644 --- a/examples/ts-vue-chat/package.json +++ b/examples/ts-vue-chat/package.json @@ -1,6 +1,6 @@ { "name": "ts-vue-chat", - "version": "0.1.38", + "version": "0.1.39", "private": true, "type": "module", "scripts": { diff --git a/examples/vanilla-chat/CHANGELOG.md b/examples/vanilla-chat/CHANGELOG.md index f2801c3ed..1ccb4839c 100644 --- a/examples/vanilla-chat/CHANGELOG.md +++ b/examples/vanilla-chat/CHANGELOG.md @@ -1,5 +1,12 @@ # vanilla-chat +## 0.0.36 + +### Patch Changes + +- Updated dependencies [[`b2d3cc1`](https://github.com/TanStack/ai/commit/b2d3cc131a31c54bd1e5841f958fbe333514e508)]: + - @tanstack/ai-client@0.9.0 + ## 0.0.35 ### Patch Changes diff --git a/examples/vanilla-chat/package.json b/examples/vanilla-chat/package.json index de3a4fef3..8dae7fb26 100644 --- a/examples/vanilla-chat/package.json +++ b/examples/vanilla-chat/package.json @@ -2,7 +2,7 @@ "name": "vanilla-chat", "private": true, "type": "module", - "version": "0.0.35", + "version": "0.0.36", "scripts": { "start": "vite --port 3001", "dev": "vite --port 3001", diff --git a/packages/typescript/ai-anthropic/CHANGELOG.md b/packages/typescript/ai-anthropic/CHANGELOG.md index 27b2414c4..92d9cf308 100644 --- a/packages/typescript/ai-anthropic/CHANGELOG.md +++ b/packages/typescript/ai-anthropic/CHANGELOG.md @@ -1,5 +1,34 @@ # @tanstack/ai-anthropic +## 0.8.4 + +### Patch Changes + +- **Fix thinking blocks getting merged across steps and lost on turn 2+ of Anthropic tool loops.** ([#391](https://github.com/TanStack/ai/pull/391)) + + Each thinking step emitted by the adapter now produces its own `ThinkingPart` on the `UIMessage` instead of being merged into a single part, and thinking content + Anthropic signatures are preserved in server-side message history so multi-turn tool flows with extended thinking work correctly. + + This includes a public callback signature change: `StreamProcessorEvents.onThinkingUpdate` now receives `(messageId, stepId, content)` instead of `(messageId, content)`. `ChatClient` has been updated to handle the new `stepId` argument internally, but consumers implementing `StreamProcessorEvents` directly need to add the new parameter. + + `@tanstack/ai`: + - `ThinkingPart` gains optional `stepId` and `signature` fields. + - `ModelMessage` gains an optional `thinking?: Array<{ content; signature? }>` field so prior thinking can be replayed in subsequent turns. + - `StepFinishedEvent` gains an optional `signature` field for provider-supplied thinking signatures. + - `StreamProcessor` tracks thinking per-step via `stepId` and keeps step ordering. `getState().thinking` / `getResult().thinking` concatenate step contents in order. + - The `onThinkingUpdate` callback on `StreamProcessorEvents` now receives `(messageId, stepId, content)` — consumers implementing it directly must add the `stepId` parameter. + - `TextEngine` accumulates thinking + signatures per iteration and includes them in assistant messages with tool calls so the next turn can replay them. + + `@tanstack/ai-anthropic`: + - Captures `signature_delta` stream events and emits the final `STEP_FINISHED` with the signature on `content_block_stop`. + - Includes thinking blocks with signatures in `formatMessages` for multi-turn history. + - Passes `betas: ['interleaved-thinking-2025-05-14']` to the `beta.messages.create` call site when a thinking budget is configured. The beta flag is scoped to the streaming path only, so `structuredOutput` (which uses the non-beta `messages.create` endpoint) is unaffected. + + `@tanstack/ai-client`: + - `ChatClient`'s internal `onThinkingUpdate` wiring is updated for the new `stepId` parameter. + +- Updated dependencies [[`b2d3cc1`](https://github.com/TanStack/ai/commit/b2d3cc131a31c54bd1e5841f958fbe333514e508)]: + - @tanstack/ai@0.15.0 + ## 0.8.3 ### Patch Changes diff --git a/packages/typescript/ai-anthropic/package.json b/packages/typescript/ai-anthropic/package.json index 546ca553a..faa0388fd 100644 --- a/packages/typescript/ai-anthropic/package.json +++ b/packages/typescript/ai-anthropic/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-anthropic", - "version": "0.8.3", + "version": "0.8.4", "description": "Anthropic Claude adapter for TanStack AI", "author": "", "license": "MIT", diff --git a/packages/typescript/ai-client/CHANGELOG.md b/packages/typescript/ai-client/CHANGELOG.md index f7b88aab0..7588d367f 100644 --- a/packages/typescript/ai-client/CHANGELOG.md +++ b/packages/typescript/ai-client/CHANGELOG.md @@ -1,5 +1,37 @@ # @tanstack/ai-client +## 0.9.0 + +### Minor Changes + +- **Fix thinking blocks getting merged across steps and lost on turn 2+ of Anthropic tool loops.** ([#391](https://github.com/TanStack/ai/pull/391)) + + Each thinking step emitted by the adapter now produces its own `ThinkingPart` on the `UIMessage` instead of being merged into a single part, and thinking content + Anthropic signatures are preserved in server-side message history so multi-turn tool flows with extended thinking work correctly. + + This includes a public callback signature change: `StreamProcessorEvents.onThinkingUpdate` now receives `(messageId, stepId, content)` instead of `(messageId, content)`. `ChatClient` has been updated to handle the new `stepId` argument internally, but consumers implementing `StreamProcessorEvents` directly need to add the new parameter. + + `@tanstack/ai`: + - `ThinkingPart` gains optional `stepId` and `signature` fields. + - `ModelMessage` gains an optional `thinking?: Array<{ content; signature? }>` field so prior thinking can be replayed in subsequent turns. + - `StepFinishedEvent` gains an optional `signature` field for provider-supplied thinking signatures. + - `StreamProcessor` tracks thinking per-step via `stepId` and keeps step ordering. `getState().thinking` / `getResult().thinking` concatenate step contents in order. + - The `onThinkingUpdate` callback on `StreamProcessorEvents` now receives `(messageId, stepId, content)` — consumers implementing it directly must add the `stepId` parameter. + - `TextEngine` accumulates thinking + signatures per iteration and includes them in assistant messages with tool calls so the next turn can replay them. + + `@tanstack/ai-anthropic`: + - Captures `signature_delta` stream events and emits the final `STEP_FINISHED` with the signature on `content_block_stop`. + - Includes thinking blocks with signatures in `formatMessages` for multi-turn history. + - Passes `betas: ['interleaved-thinking-2025-05-14']` to the `beta.messages.create` call site when a thinking budget is configured. The beta flag is scoped to the streaming path only, so `structuredOutput` (which uses the non-beta `messages.create` endpoint) is unaffected. + + `@tanstack/ai-client`: + - `ChatClient`'s internal `onThinkingUpdate` wiring is updated for the new `stepId` parameter. + +### Patch Changes + +- Updated dependencies [[`b2d3cc1`](https://github.com/TanStack/ai/commit/b2d3cc131a31c54bd1e5841f958fbe333514e508)]: + - @tanstack/ai@0.15.0 + - @tanstack/ai-event-client@0.2.9 + ## 0.8.0 ### Minor Changes diff --git a/packages/typescript/ai-client/package.json b/packages/typescript/ai-client/package.json index d916b2a60..41e29dca1 100644 --- a/packages/typescript/ai-client/package.json +++ b/packages/typescript/ai-client/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-client", - "version": "0.8.0", + "version": "0.9.0", "description": "Framework-agnostic headless client for TanStack AI", "author": "", "license": "MIT", diff --git a/packages/typescript/ai-code-mode-skills/CHANGELOG.md b/packages/typescript/ai-code-mode-skills/CHANGELOG.md index 81a92675a..a2f9abada 100644 --- a/packages/typescript/ai-code-mode-skills/CHANGELOG.md +++ b/packages/typescript/ai-code-mode-skills/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/ai-code-mode-skills +## 0.1.9 + +### Patch Changes + +- Updated dependencies [[`b2d3cc1`](https://github.com/TanStack/ai/commit/b2d3cc131a31c54bd1e5841f958fbe333514e508)]: + - @tanstack/ai@0.15.0 + - @tanstack/ai-code-mode@0.1.9 + ## 0.1.8 ### Patch Changes diff --git a/packages/typescript/ai-code-mode-skills/package.json b/packages/typescript/ai-code-mode-skills/package.json index 3d2d85806..e7d263257 100644 --- a/packages/typescript/ai-code-mode-skills/package.json +++ b/packages/typescript/ai-code-mode-skills/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-code-mode-skills", - "version": "0.1.8", + "version": "0.1.9", "description": "Persistent skill library for TanStack AI Code Mode - LLM-created reusable code snippets", "author": "", "license": "MIT", diff --git a/packages/typescript/ai-code-mode/CHANGELOG.md b/packages/typescript/ai-code-mode/CHANGELOG.md index 961487656..bc53024cb 100644 --- a/packages/typescript/ai-code-mode/CHANGELOG.md +++ b/packages/typescript/ai-code-mode/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/ai-code-mode +## 0.1.9 + +### Patch Changes + +- Updated dependencies [[`b2d3cc1`](https://github.com/TanStack/ai/commit/b2d3cc131a31c54bd1e5841f958fbe333514e508)]: + - @tanstack/ai@0.15.0 + ## 0.1.8 ### Patch Changes diff --git a/packages/typescript/ai-code-mode/models-eval/CHANGELOG.md b/packages/typescript/ai-code-mode/models-eval/CHANGELOG.md index 6aa07e930..8389ae6fa 100644 --- a/packages/typescript/ai-code-mode/models-eval/CHANGELOG.md +++ b/packages/typescript/ai-code-mode/models-eval/CHANGELOG.md @@ -1,5 +1,20 @@ # @tanstack/ai-code-mode-models-eval +## 0.0.13 + +### Patch Changes + +- Updated dependencies [[`b2d3cc1`](https://github.com/TanStack/ai/commit/b2d3cc131a31c54bd1e5841f958fbe333514e508)]: + - @tanstack/ai@0.15.0 + - @tanstack/ai-anthropic@0.8.4 + - @tanstack/ai-code-mode@0.1.9 + - @tanstack/ai-gemini@0.10.1 + - @tanstack/ai-grok@0.7.1 + - @tanstack/ai-groq@0.1.9 + - @tanstack/ai-ollama@0.6.11 + - @tanstack/ai-openai@0.8.3 + - @tanstack/ai-isolate-node@0.1.9 + ## 0.0.12 ### Patch Changes diff --git a/packages/typescript/ai-code-mode/models-eval/package.json b/packages/typescript/ai-code-mode/models-eval/package.json index 2c6dec010..2102d9fe7 100644 --- a/packages/typescript/ai-code-mode/models-eval/package.json +++ b/packages/typescript/ai-code-mode/models-eval/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-code-mode-models-eval", - "version": "0.0.12", + "version": "0.0.13", "private": true, "type": "module", "description": "Dev benchmark: local/cloud models vs code-mode database-demo gold (not published)", diff --git a/packages/typescript/ai-code-mode/package.json b/packages/typescript/ai-code-mode/package.json index cf10e9cc0..757be92cc 100644 --- a/packages/typescript/ai-code-mode/package.json +++ b/packages/typescript/ai-code-mode/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-code-mode", - "version": "0.1.8", + "version": "0.1.9", "description": "Code Mode for TanStack AI - LLM-driven code execution in secure sandboxes", "author": "", "license": "MIT", diff --git a/packages/typescript/ai-devtools/CHANGELOG.md b/packages/typescript/ai-devtools/CHANGELOG.md index 25962735e..937cbaef1 100644 --- a/packages/typescript/ai-devtools/CHANGELOG.md +++ b/packages/typescript/ai-devtools/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/ai-devtools-core +## 0.3.26 + +### Patch Changes + +- Updated dependencies [[`b2d3cc1`](https://github.com/TanStack/ai/commit/b2d3cc131a31c54bd1e5841f958fbe333514e508)]: + - @tanstack/ai@0.15.0 + - @tanstack/ai-event-client@0.2.9 + ## 0.3.25 ### Patch Changes diff --git a/packages/typescript/ai-devtools/package.json b/packages/typescript/ai-devtools/package.json index 600d5b258..0c00f2e07 100644 --- a/packages/typescript/ai-devtools/package.json +++ b/packages/typescript/ai-devtools/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-devtools-core", - "version": "0.3.25", + "version": "0.3.26", "description": "Core TanStack AI Devtools", "author": "", "license": "MIT", diff --git a/packages/typescript/ai-elevenlabs/CHANGELOG.md b/packages/typescript/ai-elevenlabs/CHANGELOG.md index 975f4ea12..32a961a34 100644 --- a/packages/typescript/ai-elevenlabs/CHANGELOG.md +++ b/packages/typescript/ai-elevenlabs/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/ai-elevenlabs +## 0.2.1 + +### Patch Changes + +- Updated dependencies [[`b2d3cc1`](https://github.com/TanStack/ai/commit/b2d3cc131a31c54bd1e5841f958fbe333514e508)]: + - @tanstack/ai@0.15.0 + - @tanstack/ai-client@0.9.0 + ## 0.2.0 ### Minor Changes diff --git a/packages/typescript/ai-elevenlabs/package.json b/packages/typescript/ai-elevenlabs/package.json index 9563f29b9..387c6d0f6 100644 --- a/packages/typescript/ai-elevenlabs/package.json +++ b/packages/typescript/ai-elevenlabs/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-elevenlabs", - "version": "0.2.0", + "version": "0.2.1", "description": "ElevenLabs adapter for TanStack AI realtime voice", "author": "", "license": "MIT", diff --git a/packages/typescript/ai-event-client/CHANGELOG.md b/packages/typescript/ai-event-client/CHANGELOG.md index 5c4aac5e2..8d88f382d 100644 --- a/packages/typescript/ai-event-client/CHANGELOG.md +++ b/packages/typescript/ai-event-client/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/ai-event-client +## 0.2.9 + +### Patch Changes + +- Updated dependencies [[`b2d3cc1`](https://github.com/TanStack/ai/commit/b2d3cc131a31c54bd1e5841f958fbe333514e508)]: + - @tanstack/ai@0.15.0 + ## 0.2.8 ### Patch Changes diff --git a/packages/typescript/ai-event-client/package.json b/packages/typescript/ai-event-client/package.json index bc692cbcb..af9a20e51 100644 --- a/packages/typescript/ai-event-client/package.json +++ b/packages/typescript/ai-event-client/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-event-client", - "version": "0.2.8", + "version": "0.2.9", "description": "Event client for TanStack AI devtools integration", "author": "", "license": "MIT", diff --git a/packages/typescript/ai-fal/CHANGELOG.md b/packages/typescript/ai-fal/CHANGELOG.md index e0a63801f..ccd7c0247 100644 --- a/packages/typescript/ai-fal/CHANGELOG.md +++ b/packages/typescript/ai-fal/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/ai-fal +## 0.7.1 + +### Patch Changes + +- Updated dependencies [[`b2d3cc1`](https://github.com/TanStack/ai/commit/b2d3cc131a31c54bd1e5841f958fbe333514e508)]: + - @tanstack/ai@0.15.0 + ## 0.7.0 ### Minor Changes diff --git a/packages/typescript/ai-fal/package.json b/packages/typescript/ai-fal/package.json index 097d3a4e0..7617c2795 100644 --- a/packages/typescript/ai-fal/package.json +++ b/packages/typescript/ai-fal/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-fal", - "version": "0.7.0", + "version": "0.7.1", "description": "fal.ai adapter for TanStack AI", "author": "", "license": "MIT", diff --git a/packages/typescript/ai-gemini/CHANGELOG.md b/packages/typescript/ai-gemini/CHANGELOG.md index 3b137c141..c56782b5d 100644 --- a/packages/typescript/ai-gemini/CHANGELOG.md +++ b/packages/typescript/ai-gemini/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/ai-gemini +## 0.10.1 + +### Patch Changes + +- Updated dependencies [[`b2d3cc1`](https://github.com/TanStack/ai/commit/b2d3cc131a31c54bd1e5841f958fbe333514e508)]: + - @tanstack/ai@0.15.0 + ## 0.10.0 ### Minor Changes diff --git a/packages/typescript/ai-gemini/package.json b/packages/typescript/ai-gemini/package.json index 565f89104..a700732e6 100644 --- a/packages/typescript/ai-gemini/package.json +++ b/packages/typescript/ai-gemini/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-gemini", - "version": "0.10.0", + "version": "0.10.1", "description": "Google Gemini adapter for TanStack AI", "author": "", "license": "MIT", diff --git a/packages/typescript/ai-grok/CHANGELOG.md b/packages/typescript/ai-grok/CHANGELOG.md index f294789ce..91d3e77e9 100644 --- a/packages/typescript/ai-grok/CHANGELOG.md +++ b/packages/typescript/ai-grok/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/ai-grok +## 0.7.1 + +### Patch Changes + +- Updated dependencies [[`b2d3cc1`](https://github.com/TanStack/ai/commit/b2d3cc131a31c54bd1e5841f958fbe333514e508)]: + - @tanstack/ai@0.15.0 + ## 0.7.0 ### Minor Changes diff --git a/packages/typescript/ai-grok/package.json b/packages/typescript/ai-grok/package.json index 077b1f130..1979058fd 100644 --- a/packages/typescript/ai-grok/package.json +++ b/packages/typescript/ai-grok/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-grok", - "version": "0.7.0", + "version": "0.7.1", "description": "Grok (xAI) adapter for TanStack AI", "author": "", "license": "MIT", diff --git a/packages/typescript/ai-groq/CHANGELOG.md b/packages/typescript/ai-groq/CHANGELOG.md index 3813e54fa..fe953605e 100644 --- a/packages/typescript/ai-groq/CHANGELOG.md +++ b/packages/typescript/ai-groq/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/ai-groq +## 0.1.9 + +### Patch Changes + +- Updated dependencies [[`b2d3cc1`](https://github.com/TanStack/ai/commit/b2d3cc131a31c54bd1e5841f958fbe333514e508)]: + - @tanstack/ai@0.15.0 + ## 0.1.8 ### Patch Changes diff --git a/packages/typescript/ai-groq/package.json b/packages/typescript/ai-groq/package.json index 54ac5a374..ab45ec382 100644 --- a/packages/typescript/ai-groq/package.json +++ b/packages/typescript/ai-groq/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-groq", - "version": "0.1.8", + "version": "0.1.9", "type": "module", "description": "Groq adapter for TanStack AI", "author": "", diff --git a/packages/typescript/ai-isolate-cloudflare/CHANGELOG.md b/packages/typescript/ai-isolate-cloudflare/CHANGELOG.md index 95b15f386..e84900893 100644 --- a/packages/typescript/ai-isolate-cloudflare/CHANGELOG.md +++ b/packages/typescript/ai-isolate-cloudflare/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/ai-isolate-cloudflare +## 0.1.9 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/ai-code-mode@0.1.9 + ## 0.1.8 ### Patch Changes diff --git a/packages/typescript/ai-isolate-cloudflare/package.json b/packages/typescript/ai-isolate-cloudflare/package.json index 55b619181..766644be3 100644 --- a/packages/typescript/ai-isolate-cloudflare/package.json +++ b/packages/typescript/ai-isolate-cloudflare/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-isolate-cloudflare", - "version": "0.1.8", + "version": "0.1.9", "description": "Cloudflare Workers driver for TanStack AI Code Mode - execute code on the edge", "author": "", "license": "MIT", diff --git a/packages/typescript/ai-isolate-node/CHANGELOG.md b/packages/typescript/ai-isolate-node/CHANGELOG.md index f46ad66a7..c0d182cc7 100644 --- a/packages/typescript/ai-isolate-node/CHANGELOG.md +++ b/packages/typescript/ai-isolate-node/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/ai-isolate-node +## 0.1.9 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/ai-code-mode@0.1.9 + ## 0.1.8 ### Patch Changes diff --git a/packages/typescript/ai-isolate-node/package.json b/packages/typescript/ai-isolate-node/package.json index d5ead5907..333a74721 100644 --- a/packages/typescript/ai-isolate-node/package.json +++ b/packages/typescript/ai-isolate-node/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-isolate-node", - "version": "0.1.8", + "version": "0.1.9", "description": "Node.js isolated-vm driver for TanStack AI Code Mode", "author": "", "license": "MIT", diff --git a/packages/typescript/ai-isolate-quickjs/CHANGELOG.md b/packages/typescript/ai-isolate-quickjs/CHANGELOG.md index 98e10b8cc..c522b0cc4 100644 --- a/packages/typescript/ai-isolate-quickjs/CHANGELOG.md +++ b/packages/typescript/ai-isolate-quickjs/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/ai-isolate-quickjs +## 0.1.9 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/ai-code-mode@0.1.9 + ## 0.1.8 ### Patch Changes diff --git a/packages/typescript/ai-isolate-quickjs/package.json b/packages/typescript/ai-isolate-quickjs/package.json index 66cc6c9f5..7ce6d83f2 100644 --- a/packages/typescript/ai-isolate-quickjs/package.json +++ b/packages/typescript/ai-isolate-quickjs/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-isolate-quickjs", - "version": "0.1.8", + "version": "0.1.9", "description": "QuickJS WASM driver for TanStack AI Code Mode - runs everywhere", "author": "", "license": "MIT", diff --git a/packages/typescript/ai-ollama/CHANGELOG.md b/packages/typescript/ai-ollama/CHANGELOG.md index 30a3546a8..21d597bb7 100644 --- a/packages/typescript/ai-ollama/CHANGELOG.md +++ b/packages/typescript/ai-ollama/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/ai-ollama +## 0.6.11 + +### Patch Changes + +- Updated dependencies [[`b2d3cc1`](https://github.com/TanStack/ai/commit/b2d3cc131a31c54bd1e5841f958fbe333514e508)]: + - @tanstack/ai@0.15.0 + ## 0.6.10 ### Patch Changes diff --git a/packages/typescript/ai-ollama/package.json b/packages/typescript/ai-ollama/package.json index 3c36bc510..e3fb0c2b2 100644 --- a/packages/typescript/ai-ollama/package.json +++ b/packages/typescript/ai-ollama/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-ollama", - "version": "0.6.10", + "version": "0.6.11", "description": "Ollama adapter for TanStack AI", "author": "", "license": "MIT", diff --git a/packages/typescript/ai-openai/CHANGELOG.md b/packages/typescript/ai-openai/CHANGELOG.md index a1870fc49..9280216fe 100644 --- a/packages/typescript/ai-openai/CHANGELOG.md +++ b/packages/typescript/ai-openai/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/ai-openai +## 0.8.3 + +### Patch Changes + +- Updated dependencies [[`b2d3cc1`](https://github.com/TanStack/ai/commit/b2d3cc131a31c54bd1e5841f958fbe333514e508)]: + - @tanstack/ai@0.15.0 + - @tanstack/ai-client@0.9.0 + ## 0.8.2 ### Patch Changes diff --git a/packages/typescript/ai-openai/package.json b/packages/typescript/ai-openai/package.json index 26a8f792d..db04c6f98 100644 --- a/packages/typescript/ai-openai/package.json +++ b/packages/typescript/ai-openai/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-openai", - "version": "0.8.2", + "version": "0.8.3", "description": "OpenAI adapter for TanStack AI", "author": "", "license": "MIT", diff --git a/packages/typescript/ai-openrouter/CHANGELOG.md b/packages/typescript/ai-openrouter/CHANGELOG.md index 4c8e068e2..6aec0adab 100644 --- a/packages/typescript/ai-openrouter/CHANGELOG.md +++ b/packages/typescript/ai-openrouter/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/ai-openrouter +## 0.8.3 + +### Patch Changes + +- Updated dependencies [[`b2d3cc1`](https://github.com/TanStack/ai/commit/b2d3cc131a31c54bd1e5841f958fbe333514e508)]: + - @tanstack/ai@0.15.0 + ## 0.8.2 ### Patch Changes diff --git a/packages/typescript/ai-openrouter/package.json b/packages/typescript/ai-openrouter/package.json index 3b1fe270a..028fefa9b 100644 --- a/packages/typescript/ai-openrouter/package.json +++ b/packages/typescript/ai-openrouter/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-openrouter", - "version": "0.8.2", + "version": "0.8.3", "description": "OpenRouter adapter for TanStack AI", "author": "", "license": "MIT", diff --git a/packages/typescript/ai-preact/CHANGELOG.md b/packages/typescript/ai-preact/CHANGELOG.md index 799b95a68..c6a9ec29e 100644 --- a/packages/typescript/ai-preact/CHANGELOG.md +++ b/packages/typescript/ai-preact/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/ai-preact +## 0.6.21 + +### Patch Changes + +- Updated dependencies [[`b2d3cc1`](https://github.com/TanStack/ai/commit/b2d3cc131a31c54bd1e5841f958fbe333514e508)]: + - @tanstack/ai@0.15.0 + - @tanstack/ai-client@0.9.0 + ## 0.6.20 ### Patch Changes diff --git a/packages/typescript/ai-preact/package.json b/packages/typescript/ai-preact/package.json index 9b6daf475..a3bc6bfc5 100644 --- a/packages/typescript/ai-preact/package.json +++ b/packages/typescript/ai-preact/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-preact", - "version": "0.6.20", + "version": "0.6.21", "description": "Preact hooks for TanStack AI", "author": "", "license": "MIT", diff --git a/packages/typescript/ai-react-ui/CHANGELOG.md b/packages/typescript/ai-react-ui/CHANGELOG.md index 87f268353..235797e02 100644 --- a/packages/typescript/ai-react-ui/CHANGELOG.md +++ b/packages/typescript/ai-react-ui/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/ai-react-ui +## 0.6.3 + +### Patch Changes + +- Updated dependencies [[`b2d3cc1`](https://github.com/TanStack/ai/commit/b2d3cc131a31c54bd1e5841f958fbe333514e508)]: + - @tanstack/ai-client@0.9.0 + - @tanstack/ai-react@0.8.1 + ## 0.6.2 ### Patch Changes diff --git a/packages/typescript/ai-react-ui/package.json b/packages/typescript/ai-react-ui/package.json index 200f9f3d1..c8b065d85 100644 --- a/packages/typescript/ai-react-ui/package.json +++ b/packages/typescript/ai-react-ui/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-react-ui", - "version": "0.6.2", + "version": "0.6.3", "description": "Headless React components for building AI chat interfaces", "module": "./dist/esm/index.js", "types": "./dist/esm/index.d.ts", diff --git a/packages/typescript/ai-react/CHANGELOG.md b/packages/typescript/ai-react/CHANGELOG.md index 3d49f6b22..a14aa34ef 100644 --- a/packages/typescript/ai-react/CHANGELOG.md +++ b/packages/typescript/ai-react/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/ai-react +## 0.8.1 + +### Patch Changes + +- Updated dependencies [[`b2d3cc1`](https://github.com/TanStack/ai/commit/b2d3cc131a31c54bd1e5841f958fbe333514e508)]: + - @tanstack/ai@0.15.0 + - @tanstack/ai-client@0.9.0 + ## 0.8.0 ### Minor Changes diff --git a/packages/typescript/ai-react/package.json b/packages/typescript/ai-react/package.json index 5949687f6..9a35c3f47 100644 --- a/packages/typescript/ai-react/package.json +++ b/packages/typescript/ai-react/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-react", - "version": "0.8.0", + "version": "0.8.1", "description": "React hooks for TanStack AI", "author": "", "license": "MIT", diff --git a/packages/typescript/ai-solid-ui/CHANGELOG.md b/packages/typescript/ai-solid-ui/CHANGELOG.md index 6cb01ab6f..fb9b5b15d 100644 --- a/packages/typescript/ai-solid-ui/CHANGELOG.md +++ b/packages/typescript/ai-solid-ui/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/ai-solid-ui +## 0.6.3 + +### Patch Changes + +- Updated dependencies [[`b2d3cc1`](https://github.com/TanStack/ai/commit/b2d3cc131a31c54bd1e5841f958fbe333514e508)]: + - @tanstack/ai-client@0.9.0 + - @tanstack/ai-solid@0.7.1 + ## 0.6.2 ### Patch Changes diff --git a/packages/typescript/ai-solid-ui/package.json b/packages/typescript/ai-solid-ui/package.json index 315576c94..95c1f511f 100644 --- a/packages/typescript/ai-solid-ui/package.json +++ b/packages/typescript/ai-solid-ui/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-solid-ui", - "version": "0.6.2", + "version": "0.6.3", "description": "Headless Solid components for building AI chat interfaces", "module": "./src/index.ts", "types": "./src/index.ts", diff --git a/packages/typescript/ai-solid/CHANGELOG.md b/packages/typescript/ai-solid/CHANGELOG.md index de6fa8556..3bf050a6e 100644 --- a/packages/typescript/ai-solid/CHANGELOG.md +++ b/packages/typescript/ai-solid/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/ai-solid +## 0.7.1 + +### Patch Changes + +- Updated dependencies [[`b2d3cc1`](https://github.com/TanStack/ai/commit/b2d3cc131a31c54bd1e5841f958fbe333514e508)]: + - @tanstack/ai@0.15.0 + - @tanstack/ai-client@0.9.0 + ## 0.7.0 ### Minor Changes diff --git a/packages/typescript/ai-solid/package.json b/packages/typescript/ai-solid/package.json index c8acc4f74..fee621465 100644 --- a/packages/typescript/ai-solid/package.json +++ b/packages/typescript/ai-solid/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-solid", - "version": "0.7.0", + "version": "0.7.1", "description": "Solid hooks for TanStack AI", "author": "", "license": "MIT", diff --git a/packages/typescript/ai-svelte/CHANGELOG.md b/packages/typescript/ai-svelte/CHANGELOG.md index 1f43dfad8..f6118a8d2 100644 --- a/packages/typescript/ai-svelte/CHANGELOG.md +++ b/packages/typescript/ai-svelte/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/ai-svelte +## 0.7.1 + +### Patch Changes + +- Updated dependencies [[`b2d3cc1`](https://github.com/TanStack/ai/commit/b2d3cc131a31c54bd1e5841f958fbe333514e508)]: + - @tanstack/ai@0.15.0 + - @tanstack/ai-client@0.9.0 + ## 0.7.0 ### Minor Changes diff --git a/packages/typescript/ai-svelte/package.json b/packages/typescript/ai-svelte/package.json index 78cf1ce34..0daf703ec 100644 --- a/packages/typescript/ai-svelte/package.json +++ b/packages/typescript/ai-svelte/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-svelte", - "version": "0.7.0", + "version": "0.7.1", "description": "Svelte bindings for TanStack AI", "author": "", "license": "MIT", diff --git a/packages/typescript/ai-vue-ui/CHANGELOG.md b/packages/typescript/ai-vue-ui/CHANGELOG.md index 89b921c4b..338f28818 100644 --- a/packages/typescript/ai-vue-ui/CHANGELOG.md +++ b/packages/typescript/ai-vue-ui/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/ai-vue-ui +## 0.1.32 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/ai-vue@0.7.1 + ## 0.1.31 ### Patch Changes diff --git a/packages/typescript/ai-vue-ui/package.json b/packages/typescript/ai-vue-ui/package.json index 4496d4582..742084f60 100644 --- a/packages/typescript/ai-vue-ui/package.json +++ b/packages/typescript/ai-vue-ui/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-vue-ui", - "version": "0.1.31", + "version": "0.1.32", "description": "Headless Vue components for building AI chat interfaces", "module": "./src/index.ts", "types": "./src/index.ts", diff --git a/packages/typescript/ai-vue/CHANGELOG.md b/packages/typescript/ai-vue/CHANGELOG.md index 7b9091959..b589fb072 100644 --- a/packages/typescript/ai-vue/CHANGELOG.md +++ b/packages/typescript/ai-vue/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/ai-vue +## 0.7.1 + +### Patch Changes + +- Updated dependencies [[`b2d3cc1`](https://github.com/TanStack/ai/commit/b2d3cc131a31c54bd1e5841f958fbe333514e508)]: + - @tanstack/ai@0.15.0 + - @tanstack/ai-client@0.9.0 + ## 0.7.0 ### Minor Changes diff --git a/packages/typescript/ai-vue/package.json b/packages/typescript/ai-vue/package.json index 48ed4b484..66e853ba4 100644 --- a/packages/typescript/ai-vue/package.json +++ b/packages/typescript/ai-vue/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai-vue", - "version": "0.7.0", + "version": "0.7.1", "description": "Vue hooks for TanStack AI", "author": "", "license": "MIT", diff --git a/packages/typescript/ai/CHANGELOG.md b/packages/typescript/ai/CHANGELOG.md index ec17609fa..29501b175 100644 --- a/packages/typescript/ai/CHANGELOG.md +++ b/packages/typescript/ai/CHANGELOG.md @@ -1,5 +1,36 @@ # @tanstack/ai +## 0.15.0 + +### Minor Changes + +- **Fix thinking blocks getting merged across steps and lost on turn 2+ of Anthropic tool loops.** ([#391](https://github.com/TanStack/ai/pull/391)) + + Each thinking step emitted by the adapter now produces its own `ThinkingPart` on the `UIMessage` instead of being merged into a single part, and thinking content + Anthropic signatures are preserved in server-side message history so multi-turn tool flows with extended thinking work correctly. + + This includes a public callback signature change: `StreamProcessorEvents.onThinkingUpdate` now receives `(messageId, stepId, content)` instead of `(messageId, content)`. `ChatClient` has been updated to handle the new `stepId` argument internally, but consumers implementing `StreamProcessorEvents` directly need to add the new parameter. + + `@tanstack/ai`: + - `ThinkingPart` gains optional `stepId` and `signature` fields. + - `ModelMessage` gains an optional `thinking?: Array<{ content; signature? }>` field so prior thinking can be replayed in subsequent turns. + - `StepFinishedEvent` gains an optional `signature` field for provider-supplied thinking signatures. + - `StreamProcessor` tracks thinking per-step via `stepId` and keeps step ordering. `getState().thinking` / `getResult().thinking` concatenate step contents in order. + - The `onThinkingUpdate` callback on `StreamProcessorEvents` now receives `(messageId, stepId, content)` — consumers implementing it directly must add the `stepId` parameter. + - `TextEngine` accumulates thinking + signatures per iteration and includes them in assistant messages with tool calls so the next turn can replay them. + + `@tanstack/ai-anthropic`: + - Captures `signature_delta` stream events and emits the final `STEP_FINISHED` with the signature on `content_block_stop`. + - Includes thinking blocks with signatures in `formatMessages` for multi-turn history. + - Passes `betas: ['interleaved-thinking-2025-05-14']` to the `beta.messages.create` call site when a thinking budget is configured. The beta flag is scoped to the streaming path only, so `structuredOutput` (which uses the non-beta `messages.create` endpoint) is unaffected. + + `@tanstack/ai-client`: + - `ChatClient`'s internal `onThinkingUpdate` wiring is updated for the new `stepId` parameter. + +### Patch Changes + +- Updated dependencies []: + - @tanstack/ai-event-client@0.2.9 + ## 0.14.0 ### Minor Changes diff --git a/packages/typescript/ai/package.json b/packages/typescript/ai/package.json index 2ad62f817..607828c2f 100644 --- a/packages/typescript/ai/package.json +++ b/packages/typescript/ai/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai", - "version": "0.14.0", + "version": "0.15.0", "description": "Core TanStack AI library - Open source AI SDK", "author": "Tanner Linsley", "license": "MIT", diff --git a/packages/typescript/preact-ai-devtools/CHANGELOG.md b/packages/typescript/preact-ai-devtools/CHANGELOG.md index 921189d1c..cfb9d0aff 100644 --- a/packages/typescript/preact-ai-devtools/CHANGELOG.md +++ b/packages/typescript/preact-ai-devtools/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/preact-ai-devtools +## 0.1.30 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/ai-devtools-core@0.3.26 + ## 0.1.29 ### Patch Changes diff --git a/packages/typescript/preact-ai-devtools/package.json b/packages/typescript/preact-ai-devtools/package.json index 71899ff70..830c9344c 100644 --- a/packages/typescript/preact-ai-devtools/package.json +++ b/packages/typescript/preact-ai-devtools/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/preact-ai-devtools", - "version": "0.1.29", + "version": "0.1.30", "description": "Preact Devtools for TanStack AI.", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/typescript/react-ai-devtools/CHANGELOG.md b/packages/typescript/react-ai-devtools/CHANGELOG.md index c8d35de5a..ba7412d85 100644 --- a/packages/typescript/react-ai-devtools/CHANGELOG.md +++ b/packages/typescript/react-ai-devtools/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/react-ai-devtools +## 0.2.30 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/ai-devtools-core@0.3.26 + ## 0.2.29 ### Patch Changes diff --git a/packages/typescript/react-ai-devtools/package.json b/packages/typescript/react-ai-devtools/package.json index 10216b77d..399154b8a 100644 --- a/packages/typescript/react-ai-devtools/package.json +++ b/packages/typescript/react-ai-devtools/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/react-ai-devtools", - "version": "0.2.29", + "version": "0.2.30", "description": "React Devtools for TanStack AI.", "author": "tannerlinsley", "license": "MIT", diff --git a/packages/typescript/solid-ai-devtools/CHANGELOG.md b/packages/typescript/solid-ai-devtools/CHANGELOG.md index 587838b02..efcf24bfe 100644 --- a/packages/typescript/solid-ai-devtools/CHANGELOG.md +++ b/packages/typescript/solid-ai-devtools/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/solid-ai-devtools +## 0.2.30 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/ai-devtools-core@0.3.26 + ## 0.2.29 ### Patch Changes diff --git a/packages/typescript/solid-ai-devtools/package.json b/packages/typescript/solid-ai-devtools/package.json index cb980895b..b682f3a2b 100644 --- a/packages/typescript/solid-ai-devtools/package.json +++ b/packages/typescript/solid-ai-devtools/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/solid-ai-devtools", - "version": "0.2.29", + "version": "0.2.30", "description": "Solid TanStack AI Devtools", "author": "", "license": "MIT",