| Error | Type validation failed: Value: {"id":"...","object":"chat.completion.chunk",...}. Error message: [ { ... "path": [ "choices", 0, "delta", ... ] ... } ] |
|---|---|
| What it is | A streamed chunk from the model provider that didn't match the shape the AI SDK expects, so the Assistant turn stops |
| Seen with | Mistral API (zai-glm-5-2), Gemini's OpenAI-compatible endpoint (generativelanguage.googleapis.com/v1beta/openai/) |
| Fixed in | 2.44.0 (thinking blocks), 2.46.0 (tool call without id), 2.49.0 / 3.3.0 (tool call without index) |
| Reports | 3 people on GitHub, 29 Aug to 8 Oct 2026 (#37352, #38953, #39339, #40646) |
| Checked | 5 Dec 2026, against the sources listed below |
Match your error's path
| Path and message in the error | Cause | Fixed in |
|---|---|---|
"choices", 0, "delta", "content": expected string, received array | Mistral streams content as an array of "type":"thinking" blocks (#37352, #40646) | n8n 2.44.0, per n8n's release bot on #40646 (PR #37875, "Support streamed reasoning from custom AI endpoints"). No reporter has confirmed since. |
"choices", 0, "delta", "tool_calls", 0, "id": expected string, received undefined | Mistral sends follow-up tool-call chunks without an id (#38953) | n8n 2.46.0. An n8n engineer: "n8n 2.46.0 and later include the fix", from a newer @ai-sdk/mistral (PR #42076). |
"choices", 0, "delta", "tool_calls", 0, "index": expected number, received undefined | Gemini's OpenAI-compatible endpoint leaves out index on tool calls (#39339) | PR #43234, in the 2.49.0 and 3.3.0 release notes: such endpoints now use @ai-sdk/openai-compatible, which accepts tool calls without an index. |
Fix it
- Update n8n to at least the version in the table for your path (2.49.0 or later covers all three).
- Check the model settings. The Assistant model comes from
N8N_INSTANCE_AI_MODELinprovider/modelform (for examplemistral/zai-glm-5-2); a custom OpenAI-compatible server goes inN8N_INSTANCE_AI_MODEL_URLand its key inN8N_INSTANCE_AI_MODEL_API_KEY. That is the variable name in n8n's current source; the reporter of #38953 usedN8N_INSTANCE_AI_MODEL_BASE_URL. - Mistral URL: an n8n engineer in #38953: the default Mistral base URL ends in
/v1(https://api.mistral.ai/v1); for the EU endpoint tryhttps://api.eu.mistral.ai/v1. - Can't update yet? The reporter of #37352 found the same prompts worked through OpenRouter, which a commenter says strips the thinking blocks. That's a user report, not an n8n fix.
Still failing after updating? Post the new error with its path on the matching issue; the path is what tells the bugs apart.
Running Claude Code, Codex or Cursor on real repos, or shipping an AI agent? A Quick Review ($149 / ₹13,900, 1 working day) checks one repo, config or setup for leaked keys, risky agent permissions and MCP servers. Request a Quick Review
FAQ
What does 'Type validation failed: Value: chat.completion.chunk' mean in n8n?
A streamed response chunk from your model provider didn't match the shape n8n's AI SDK expects, so the Assistant stopped. The path in the error shows which field was wrong.
How do I fix it with Mistral?
Update n8n: content arrays (thinking blocks) were fixed in 2.44.0 and tool calls without an id in 2.46.0.
How do I fix it with Gemini's OpenAI-compatible endpoint?
Update to 2.49.0 or 3.3.0 or later. PR #43234 switched such endpoints to an adapter that accepts tool calls without an index.
Which variable sets the Assistant's model URL?
N8N_INSTANCE_AI_MODEL_URL in n8n's current source, with N8N_INSTANCE_AI_MODEL in provider/model form and N8N_INSTANCE_AI_MODEL_API_KEY.
Related errors
- n8n: Function tools with reasoning_effort are not supported
- n8n: Task request timed out (Code node not matched to a runner)
- OpenAI API error 400, 500 and 503
Sources
Read 5 Dec 2026. These tools change often: if a step no longer matches, the linked page wins.
- n8n-io/n8n #37352 (Mistral thinking blocks: content expected string, received array): github.com/n8n-io/n8n/issues/37352
- n8n-io/n8n #40646 (same, re-filed; released with 2.44.0): github.com/n8n-io/n8n/issues/40646
- n8n-io/n8n #38953 (Mistral tool_calls id; n8n: fixed in 2.46.0): github.com/n8n-io/n8n/issues/38953
- n8n-io/n8n #39339 (Gemini OpenAI-compatible: tool_calls index): github.com/n8n-io/n8n/issues/39339
- n8n PR #37875 (streamed reasoning from custom AI endpoints, 2.44.0): github.com/n8n-io/n8n/pull/37875
- n8n PR #42076 (AI SDK packages updated): github.com/n8n-io/n8n/pull/42076
- n8n PR #43234 (tool calls from Gemini's OpenAI-compatible endpoint): github.com/n8n-io/n8n/pull/43234
- n8n release notes: 2.49.0: github.com/n8n-io/n8n/releases/tag/n8n%402.49.0
- n8n source: Assistant model settings (instance-ai.config.ts L33-L56): github.com/n8n-io/n8n/blob/c40524fb7299ab7c31d0d7546807fc8ead75f6b7/packages/@n8n/config/src/configs/instance-ai.config.ts#L33-L56
- Exposed API key checker: find API keys committed to a repo or shipped to the browser
- LLM API cost checker: find LLM calls with no limits or retries capped
- MCP config checker: scan your mcp.json for hard-coded tokens, unpinned servers and risky access