diff --git a/.changeset/fix-null-tool-input-normalization.md b/.changeset/fix-null-tool-input-normalization.md deleted file mode 100644 index b15c356f6..000000000 --- a/.changeset/fix-null-tool-input-normalization.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -'@tanstack/ai': patch -'@tanstack/ai-openai': patch -'@tanstack/ai-gemini': patch -'@tanstack/ai-ollama': patch ---- - -fix(ai, ai-openai, ai-gemini, ai-ollama): normalize null tool input to empty object - -When a model produces a `tool_use` block with no input, `JSON.parse('null')` returns `null` which fails Zod schema validation and silently kills the agent loop. Normalize null/non-object parsed tool input to `{}` in `executeToolCalls`, `ToolCallManager.completeToolCall`, `ToolCallManager.executeTools`, and the OpenAI/Gemini/Ollama adapter `TOOL_CALL_END` emissions. The Anthropic adapter already had this fix. diff --git a/.changeset/giant-garlics-crash.md b/.changeset/giant-garlics-crash.md deleted file mode 100644 index f468f7848..000000000 --- a/.changeset/giant-garlics-crash.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -'@tanstack/ai-openrouter': patch ---- - -- Upgrade `@openrouter/sdk` to 0.12.14 (from 0.3.15) -- Migrate adapters and tests to the SDK's renamed chat types (`ChatGenerationParams` → `ChatRequest`, `ChatResponse` → `ChatResult`) and the renamed `chatRequest` key on `chat.send` -- Derive `text-provider-options` types from the SDK's `ChatRequest` so provider options stay in lockstep with the SDK surface -- Drop `topK` / `topA` / `minP` / `repetitionPenalty` / `includeReasoning` / `verbosity` / `webSearchOptions` from `OpenRouterBaseOptions` now that the SDK narrows `ChatRequest` to OpenAI-compatible fields — callers passing these previously saw them silently stripped at runtime, and now get a TypeScript error instead -- Add those same keys to `excludedParams` in the model-catalog generator so future syncs don't reintroduce them -- Switch `structuredOutput` to the SDK's native `responseFormat: { type: 'json_schema' }` instead of coercing the model via a forced `structured_output` tool call — the schema now flows straight to the provider, yielding cleaner responses and dropping the dummy-tool round-trip -- Apply the OpenAI-strict schema transformation (`additionalProperties: false`, all properties required, optional fields widened to include `null`) inside `structuredOutput` before forwarding — without this, upstream OpenAI rejected the request with "Provider returned error" for schemas generated by Zod / ArkType / Valibot -- Refactor options passthrough to use camelCase naming convention -- Refresh the model catalog with the latest OpenRouter models (Opus 4.6, Sonnet 4.6, Gemini 3.1 Pro, etc.) and remove the deprecated `openrouter/auto` model -- Unify the outbound request payload envelope -- Improve error handling and add tests for nested payloads, structured output parsing, and error cases diff --git a/.changeset/sync-models.md b/.changeset/sync-models.md deleted file mode 100644 index 738c1d701..000000000 --- a/.changeset/sync-models.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@tanstack/ai-anthropic': patch -'@tanstack/ai-openrouter': patch ---- - -Update model metadata from OpenRouter API diff --git a/examples/ts-svelte-chat/CHANGELOG.md b/examples/ts-svelte-chat/CHANGELOG.md index 316f3c440..b1f8a89fc 100644 --- a/examples/ts-svelte-chat/CHANGELOG.md +++ b/examples/ts-svelte-chat/CHANGELOG.md @@ -1,5 +1,18 @@ # ts-svelte-chat +## 0.1.32 + +### Patch Changes + +- Updated dependencies [[`c780bc1`](https://github.com/TanStack/ai/commit/c780bc127755ecf7e900343bf0e4d4823ff526ca), [`cb07e01`](https://github.com/TanStack/ai/commit/cb07e015f2d4a27289d830a61dba48f8aa72cc6c)]: + - @tanstack/ai@0.10.3 + - @tanstack/ai-openai@0.7.5 + - @tanstack/ai-gemini@0.8.8 + - @tanstack/ai-ollama@0.6.6 + - @tanstack/ai-anthropic@0.7.4 + - @tanstack/ai-client@0.7.10 + - @tanstack/ai-svelte@0.6.15 + ## 0.1.31 ### Patch Changes diff --git a/examples/ts-svelte-chat/package.json b/examples/ts-svelte-chat/package.json index 53cd16211..3699f9ee7 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.31", + "version": "0.1.32", "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 105f4c568..122fdb1e6 100644 --- a/examples/ts-vue-chat/CHANGELOG.md +++ b/examples/ts-vue-chat/CHANGELOG.md @@ -1,5 +1,19 @@ # ts-vue-chat +## 0.1.32 + +### Patch Changes + +- Updated dependencies [[`c780bc1`](https://github.com/TanStack/ai/commit/c780bc127755ecf7e900343bf0e4d4823ff526ca), [`cb07e01`](https://github.com/TanStack/ai/commit/cb07e015f2d4a27289d830a61dba48f8aa72cc6c)]: + - @tanstack/ai@0.10.3 + - @tanstack/ai-openai@0.7.5 + - @tanstack/ai-gemini@0.8.8 + - @tanstack/ai-ollama@0.6.6 + - @tanstack/ai-anthropic@0.7.4 + - @tanstack/ai-client@0.7.10 + - @tanstack/ai-vue@0.6.15 + - @tanstack/ai-vue-ui@0.1.26 + ## 0.1.31 ### Patch Changes diff --git a/examples/ts-vue-chat/package.json b/examples/ts-vue-chat/package.json index 7cff079ae..3232d48f7 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.31", + "version": "0.1.32", "private": true, "type": "module", "scripts": { diff --git a/examples/vanilla-chat/CHANGELOG.md b/examples/vanilla-chat/CHANGELOG.md index fc9dbbb80..77dddfea6 100644 --- a/examples/vanilla-chat/CHANGELOG.md +++ b/examples/vanilla-chat/CHANGELOG.md @@ -1,5 +1,12 @@ # vanilla-chat +## 0.0.30 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/ai-client@0.7.10 + ## 0.0.29 ### Patch Changes diff --git a/examples/vanilla-chat/package.json b/examples/vanilla-chat/package.json index 74cde5f17..82cd6c6ab 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.29", + "version": "0.0.30", "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 3b6973861..662145639 100644 --- a/packages/typescript/ai-anthropic/CHANGELOG.md +++ b/packages/typescript/ai-anthropic/CHANGELOG.md @@ -1,5 +1,14 @@ # @tanstack/ai-anthropic +## 0.7.4 + +### Patch Changes + +- Update model metadata from OpenRouter API ([#451](https://github.com/TanStack/ai/pull/451)) + +- Updated dependencies [[`c780bc1`](https://github.com/TanStack/ai/commit/c780bc127755ecf7e900343bf0e4d4823ff526ca)]: + - @tanstack/ai@0.10.3 + ## 0.7.3 ### Patch Changes diff --git a/packages/typescript/ai-anthropic/package.json b/packages/typescript/ai-anthropic/package.json index 44a27492b..400a328a6 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.7.3", + "version": "0.7.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 6f84a1332..57199d7a4 100644 --- a/packages/typescript/ai-client/CHANGELOG.md +++ b/packages/typescript/ai-client/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/ai-client +## 0.7.10 + +### Patch Changes + +- Updated dependencies [[`c780bc1`](https://github.com/TanStack/ai/commit/c780bc127755ecf7e900343bf0e4d4823ff526ca)]: + - @tanstack/ai@0.10.3 + - @tanstack/ai-event-client@0.2.3 + ## 0.7.9 ### Patch Changes diff --git a/packages/typescript/ai-client/package.json b/packages/typescript/ai-client/package.json index a73ad6a42..292e511af 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.7.9", + "version": "0.7.10", "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 2518c1f81..2fa7564b8 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.3 + +### Patch Changes + +- Updated dependencies [[`c780bc1`](https://github.com/TanStack/ai/commit/c780bc127755ecf7e900343bf0e4d4823ff526ca)]: + - @tanstack/ai@0.10.3 + - @tanstack/ai-code-mode@0.1.3 + ## 0.1.2 ### Patch Changes diff --git a/packages/typescript/ai-code-mode-skills/package.json b/packages/typescript/ai-code-mode-skills/package.json index e8aaf896d..99f4cd55a 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.2", + "version": "0.1.3", "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 e6a630961..a5d464eb8 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.3 + +### Patch Changes + +- Updated dependencies [[`c780bc1`](https://github.com/TanStack/ai/commit/c780bc127755ecf7e900343bf0e4d4823ff526ca)]: + - @tanstack/ai@0.10.3 + ## 0.1.2 ### 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 4f46d548d..5c667fece 100644 --- a/packages/typescript/ai-code-mode/models-eval/CHANGELOG.md +++ b/packages/typescript/ai-code-mode/models-eval/CHANGELOG.md @@ -1,5 +1,18 @@ # @tanstack/ai-code-mode-models-eval +## 0.0.6 + +### Patch Changes + +- Updated dependencies [[`c780bc1`](https://github.com/TanStack/ai/commit/c780bc127755ecf7e900343bf0e4d4823ff526ca), [`cb07e01`](https://github.com/TanStack/ai/commit/cb07e015f2d4a27289d830a61dba48f8aa72cc6c)]: + - @tanstack/ai@0.10.3 + - @tanstack/ai-openai@0.7.5 + - @tanstack/ai-gemini@0.8.8 + - @tanstack/ai-ollama@0.6.6 + - @tanstack/ai-anthropic@0.7.4 + - @tanstack/ai-code-mode@0.1.3 + - @tanstack/ai-isolate-node@0.1.3 + ## 0.0.5 ### 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 c60d82d78..51af50541 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.5", + "version": "0.0.6", "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 e58147cb0..500af1116 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.2", + "version": "0.1.3", "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 bba79e161..e987a2ddf 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.20 + +### Patch Changes + +- Updated dependencies [[`c780bc1`](https://github.com/TanStack/ai/commit/c780bc127755ecf7e900343bf0e4d4823ff526ca)]: + - @tanstack/ai@0.10.3 + - @tanstack/ai-event-client@0.2.3 + ## 0.3.19 ### Patch Changes diff --git a/packages/typescript/ai-devtools/package.json b/packages/typescript/ai-devtools/package.json index 91adda3ec..2fc0b5f87 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.19", + "version": "0.3.20", "description": "Core TanStack AI Devtools", "author": "", "license": "MIT", diff --git a/packages/typescript/ai-event-client/CHANGELOG.md b/packages/typescript/ai-event-client/CHANGELOG.md index 0594103a5..fe58f3bf2 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.3 + +### Patch Changes + +- Updated dependencies [[`c780bc1`](https://github.com/TanStack/ai/commit/c780bc127755ecf7e900343bf0e4d4823ff526ca)]: + - @tanstack/ai@0.10.3 + ## 0.2.2 ### Patch Changes diff --git a/packages/typescript/ai-event-client/package.json b/packages/typescript/ai-event-client/package.json index c6339f904..ca860bfb3 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.2", + "version": "0.2.3", "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 ead9c6928..57b21a6cd 100644 --- a/packages/typescript/ai-fal/CHANGELOG.md +++ b/packages/typescript/ai-fal/CHANGELOG.md @@ -1,5 +1,12 @@ # @tanstack/ai-fal +## 0.6.13 + +### Patch Changes + +- Updated dependencies [[`c780bc1`](https://github.com/TanStack/ai/commit/c780bc127755ecf7e900343bf0e4d4823ff526ca)]: + - @tanstack/ai@0.10.3 + ## 0.6.12 ### Patch Changes diff --git a/packages/typescript/ai-fal/package.json b/packages/typescript/ai-fal/package.json index 7504b1e99..1825308ac 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.6.12", + "version": "0.6.13", "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 7ccd71d42..cf0eabceb 100644 --- a/packages/typescript/ai-gemini/CHANGELOG.md +++ b/packages/typescript/ai-gemini/CHANGELOG.md @@ -1,5 +1,16 @@ # @tanstack/ai-gemini +## 0.8.8 + +### Patch Changes + +- fix(ai, ai-openai, ai-gemini, ai-ollama): normalize null tool input to empty object ([#430](https://github.com/TanStack/ai/pull/430)) + + When a model produces a `tool_use` block with no input, `JSON.parse('null')` returns `null` which fails Zod schema validation and silently kills the agent loop. Normalize null/non-object parsed tool input to `{}` in `executeToolCalls`, `ToolCallManager.completeToolCall`, `ToolCallManager.executeTools`, and the OpenAI/Gemini/Ollama adapter `TOOL_CALL_END` emissions. The Anthropic adapter already had this fix. + +- Updated dependencies [[`c780bc1`](https://github.com/TanStack/ai/commit/c780bc127755ecf7e900343bf0e4d4823ff526ca)]: + - @tanstack/ai@0.10.3 + ## 0.8.7 ### Patch Changes diff --git a/packages/typescript/ai-gemini/package.json b/packages/typescript/ai-gemini/package.json index c7ad4ce23..7923ad8f4 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.8.7", + "version": "0.8.8", "description": "Google Gemini adapter for TanStack AI", "author": "", "license": "MIT", diff --git a/packages/typescript/ai-isolate-cloudflare/CHANGELOG.md b/packages/typescript/ai-isolate-cloudflare/CHANGELOG.md index ae1211cb8..6e3f464a3 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.3 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/ai-code-mode@0.1.3 + ## 0.1.2 ### Patch Changes diff --git a/packages/typescript/ai-isolate-cloudflare/package.json b/packages/typescript/ai-isolate-cloudflare/package.json index 6e641a58c..2b65aaf58 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.2", + "version": "0.1.3", "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 1138613f7..50d1fcf9c 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.3 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/ai-code-mode@0.1.3 + ## 0.1.2 ### Patch Changes diff --git a/packages/typescript/ai-isolate-node/package.json b/packages/typescript/ai-isolate-node/package.json index a82624035..c5195558a 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.2", + "version": "0.1.3", "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 7b3bad604..50cb1b540 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.3 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/ai-code-mode@0.1.3 + ## 0.1.2 ### Patch Changes diff --git a/packages/typescript/ai-isolate-quickjs/package.json b/packages/typescript/ai-isolate-quickjs/package.json index 06f6ebd03..c0ca7ac7a 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.2", + "version": "0.1.3", "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 83d27be33..662183b21 100644 --- a/packages/typescript/ai-ollama/CHANGELOG.md +++ b/packages/typescript/ai-ollama/CHANGELOG.md @@ -1,5 +1,16 @@ # @tanstack/ai-ollama +## 0.6.6 + +### Patch Changes + +- fix(ai, ai-openai, ai-gemini, ai-ollama): normalize null tool input to empty object ([#430](https://github.com/TanStack/ai/pull/430)) + + When a model produces a `tool_use` block with no input, `JSON.parse('null')` returns `null` which fails Zod schema validation and silently kills the agent loop. Normalize null/non-object parsed tool input to `{}` in `executeToolCalls`, `ToolCallManager.completeToolCall`, `ToolCallManager.executeTools`, and the OpenAI/Gemini/Ollama adapter `TOOL_CALL_END` emissions. The Anthropic adapter already had this fix. + +- Updated dependencies [[`c780bc1`](https://github.com/TanStack/ai/commit/c780bc127755ecf7e900343bf0e4d4823ff526ca)]: + - @tanstack/ai@0.10.3 + ## 0.6.5 ### Patch Changes diff --git a/packages/typescript/ai-ollama/package.json b/packages/typescript/ai-ollama/package.json index 9828cb5a3..b305413e7 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.5", + "version": "0.6.6", "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 15e354ee2..4f407c88e 100644 --- a/packages/typescript/ai-openai/CHANGELOG.md +++ b/packages/typescript/ai-openai/CHANGELOG.md @@ -1,5 +1,17 @@ # @tanstack/ai-openai +## 0.7.5 + +### Patch Changes + +- fix(ai, ai-openai, ai-gemini, ai-ollama): normalize null tool input to empty object ([#430](https://github.com/TanStack/ai/pull/430)) + + When a model produces a `tool_use` block with no input, `JSON.parse('null')` returns `null` which fails Zod schema validation and silently kills the agent loop. Normalize null/non-object parsed tool input to `{}` in `executeToolCalls`, `ToolCallManager.completeToolCall`, `ToolCallManager.executeTools`, and the OpenAI/Gemini/Ollama adapter `TOOL_CALL_END` emissions. The Anthropic adapter already had this fix. + +- Updated dependencies [[`c780bc1`](https://github.com/TanStack/ai/commit/c780bc127755ecf7e900343bf0e4d4823ff526ca)]: + - @tanstack/ai@0.10.3 + - @tanstack/ai-client@0.7.10 + ## 0.7.4 ### Patch Changes diff --git a/packages/typescript/ai-openai/package.json b/packages/typescript/ai-openai/package.json index 0fdbc8d99..40a464bd3 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.7.4", + "version": "0.7.5", "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 a7dafd305..31c92f913 100644 --- a/packages/typescript/ai-openrouter/CHANGELOG.md +++ b/packages/typescript/ai-openrouter/CHANGELOG.md @@ -1,5 +1,26 @@ # @tanstack/ai-openrouter +## 0.7.5 + +### Patch Changes + +- - Upgrade `@openrouter/sdk` to 0.12.14 (from 0.3.15) ([#312](https://github.com/TanStack/ai/pull/312)) + - Migrate adapters and tests to the SDK's renamed chat types (`ChatGenerationParams` → `ChatRequest`, `ChatResponse` → `ChatResult`) and the renamed `chatRequest` key on `chat.send` + - Derive `text-provider-options` types from the SDK's `ChatRequest` so provider options stay in lockstep with the SDK surface + - Drop `topK` / `topA` / `minP` / `repetitionPenalty` / `includeReasoning` / `verbosity` / `webSearchOptions` from `OpenRouterBaseOptions` now that the SDK narrows `ChatRequest` to OpenAI-compatible fields — callers passing these previously saw them silently stripped at runtime, and now get a TypeScript error instead + - Add those same keys to `excludedParams` in the model-catalog generator so future syncs don't reintroduce them + - Switch `structuredOutput` to the SDK's native `responseFormat: { type: 'json_schema' }` instead of coercing the model via a forced `structured_output` tool call — the schema now flows straight to the provider, yielding cleaner responses and dropping the dummy-tool round-trip + - Apply the OpenAI-strict schema transformation (`additionalProperties: false`, all properties required, optional fields widened to include `null`) inside `structuredOutput` before forwarding — without this, upstream OpenAI rejected the request with "Provider returned error" for schemas generated by Zod / ArkType / Valibot + - Refactor options passthrough to use camelCase naming convention + - Refresh the model catalog with the latest OpenRouter models (Opus 4.6, Sonnet 4.6, Gemini 3.1 Pro, etc.) and remove the deprecated `openrouter/auto` model + - Unify the outbound request payload envelope + - Improve error handling and add tests for nested payloads, structured output parsing, and error cases + +- Update model metadata from OpenRouter API ([#451](https://github.com/TanStack/ai/pull/451)) + +- Updated dependencies [[`c780bc1`](https://github.com/TanStack/ai/commit/c780bc127755ecf7e900343bf0e4d4823ff526ca)]: + - @tanstack/ai@0.10.3 + ## 0.7.4 ### Patch Changes diff --git a/packages/typescript/ai-openrouter/package.json b/packages/typescript/ai-openrouter/package.json index 772eb523c..2c708b589 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.7.4", + "version": "0.7.5", "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 f4ef98655..fc3e11f88 100644 --- a/packages/typescript/ai-preact/CHANGELOG.md +++ b/packages/typescript/ai-preact/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/ai-preact +## 0.6.15 + +### Patch Changes + +- Updated dependencies [[`c780bc1`](https://github.com/TanStack/ai/commit/c780bc127755ecf7e900343bf0e4d4823ff526ca)]: + - @tanstack/ai@0.10.3 + - @tanstack/ai-client@0.7.10 + ## 0.6.14 ### Patch Changes diff --git a/packages/typescript/ai-preact/package.json b/packages/typescript/ai-preact/package.json index cd1fac481..2b863dbcb 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.14", + "version": "0.6.15", "description": "Preact hooks for TanStack AI", "author": "", "license": "MIT", diff --git a/packages/typescript/ai-react/CHANGELOG.md b/packages/typescript/ai-react/CHANGELOG.md index c74b58e4b..80d288237 100644 --- a/packages/typescript/ai-react/CHANGELOG.md +++ b/packages/typescript/ai-react/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/ai-react +## 0.7.11 + +### Patch Changes + +- Updated dependencies [[`c780bc1`](https://github.com/TanStack/ai/commit/c780bc127755ecf7e900343bf0e4d4823ff526ca)]: + - @tanstack/ai@0.10.3 + - @tanstack/ai-client@0.7.10 + ## 0.7.10 ### Patch Changes diff --git a/packages/typescript/ai-react/package.json b/packages/typescript/ai-react/package.json index dc7ec3774..655a44d96 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.7.10", + "version": "0.7.11", "description": "React hooks for TanStack AI", "author": "", "license": "MIT", diff --git a/packages/typescript/ai-solid/CHANGELOG.md b/packages/typescript/ai-solid/CHANGELOG.md index 7c5e93bfc..4be733957 100644 --- a/packages/typescript/ai-solid/CHANGELOG.md +++ b/packages/typescript/ai-solid/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/ai-solid +## 0.6.15 + +### Patch Changes + +- Updated dependencies [[`c780bc1`](https://github.com/TanStack/ai/commit/c780bc127755ecf7e900343bf0e4d4823ff526ca)]: + - @tanstack/ai@0.10.3 + - @tanstack/ai-client@0.7.10 + ## 0.6.14 ### Patch Changes diff --git a/packages/typescript/ai-solid/package.json b/packages/typescript/ai-solid/package.json index 847ae5ce6..85e7ecef0 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.6.14", + "version": "0.6.15", "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 5a4dd5360..24b645589 100644 --- a/packages/typescript/ai-svelte/CHANGELOG.md +++ b/packages/typescript/ai-svelte/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/ai-svelte +## 0.6.15 + +### Patch Changes + +- Updated dependencies [[`c780bc1`](https://github.com/TanStack/ai/commit/c780bc127755ecf7e900343bf0e4d4823ff526ca)]: + - @tanstack/ai@0.10.3 + - @tanstack/ai-client@0.7.10 + ## 0.6.14 ### Patch Changes diff --git a/packages/typescript/ai-svelte/package.json b/packages/typescript/ai-svelte/package.json index 6179b4204..ad6adfafc 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.6.14", + "version": "0.6.15", "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 cf501e8d7..f054ab81c 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.26 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/ai-vue@0.6.15 + ## 0.1.25 ### Patch Changes diff --git a/packages/typescript/ai-vue-ui/package.json b/packages/typescript/ai-vue-ui/package.json index 635d16853..f62cc53c5 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.25", + "version": "0.1.26", "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 6ea14a903..ee8770228 100644 --- a/packages/typescript/ai-vue/CHANGELOG.md +++ b/packages/typescript/ai-vue/CHANGELOG.md @@ -1,5 +1,13 @@ # @tanstack/ai-vue +## 0.6.15 + +### Patch Changes + +- Updated dependencies [[`c780bc1`](https://github.com/TanStack/ai/commit/c780bc127755ecf7e900343bf0e4d4823ff526ca)]: + - @tanstack/ai@0.10.3 + - @tanstack/ai-client@0.7.10 + ## 0.6.14 ### Patch Changes diff --git a/packages/typescript/ai-vue/package.json b/packages/typescript/ai-vue/package.json index a4a657e2c..0deec450f 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.6.14", + "version": "0.6.15", "description": "Vue hooks for TanStack AI", "author": "", "license": "MIT", diff --git a/packages/typescript/ai/CHANGELOG.md b/packages/typescript/ai/CHANGELOG.md index f238fe42e..2ac1df504 100644 --- a/packages/typescript/ai/CHANGELOG.md +++ b/packages/typescript/ai/CHANGELOG.md @@ -1,5 +1,16 @@ # @tanstack/ai +## 0.10.3 + +### Patch Changes + +- fix(ai, ai-openai, ai-gemini, ai-ollama): normalize null tool input to empty object ([#430](https://github.com/TanStack/ai/pull/430)) + + When a model produces a `tool_use` block with no input, `JSON.parse('null')` returns `null` which fails Zod schema validation and silently kills the agent loop. Normalize null/non-object parsed tool input to `{}` in `executeToolCalls`, `ToolCallManager.completeToolCall`, `ToolCallManager.executeTools`, and the OpenAI/Gemini/Ollama adapter `TOOL_CALL_END` emissions. The Anthropic adapter already had this fix. + +- Updated dependencies []: + - @tanstack/ai-event-client@0.2.3 + ## 0.10.2 ### Patch Changes diff --git a/packages/typescript/ai/package.json b/packages/typescript/ai/package.json index 4992910af..360a2b896 100644 --- a/packages/typescript/ai/package.json +++ b/packages/typescript/ai/package.json @@ -1,6 +1,6 @@ { "name": "@tanstack/ai", - "version": "0.10.2", + "version": "0.10.3", "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 26fad8a33..524f4fa5e 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.24 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/ai-devtools-core@0.3.20 + ## 0.1.23 ### Patch Changes diff --git a/packages/typescript/preact-ai-devtools/package.json b/packages/typescript/preact-ai-devtools/package.json index 72af2e80f..9cf3509bd 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.23", + "version": "0.1.24", "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 71ebc47ac..33d58720b 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.24 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/ai-devtools-core@0.3.20 + ## 0.2.23 ### Patch Changes diff --git a/packages/typescript/react-ai-devtools/package.json b/packages/typescript/react-ai-devtools/package.json index 929c006c3..ac2bcf96b 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.23", + "version": "0.2.24", "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 5dc9e2a26..26337cbca 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.24 + +### Patch Changes + +- Updated dependencies []: + - @tanstack/ai-devtools-core@0.3.20 + ## 0.2.23 ### Patch Changes diff --git a/packages/typescript/solid-ai-devtools/package.json b/packages/typescript/solid-ai-devtools/package.json index a754cc5a4..f71c5f517 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.23", + "version": "0.2.24", "description": "Solid TanStack AI Devtools", "author": "", "license": "MIT",