Shipping an AI app or agent? Security review in 1 working day: $149 / ₹13,900. Request a review →
AI Review Ready
Home / Error fixes / Assistant: Type validation failed
Fix · n8n Assistant · Instance AI · Mistral · Gemini

n8n Assistant: Type validation failed (chat.completion.chunk)

Fix: update n8n, then read the "path" in the error to see which bug you hit. delta, content expected string, received array = Mistral thinking blocks (fixed in 2.44.0); tool_calls, 0, id = Mistral tool calls without an id (fixed in 2.46.0); tool_calls, 0, index = Gemini's OpenAI-compatible endpoint (fixed in 2.49.0 / 3.3.0).

At a glance
ErrorType validation failed: Value: {"id":"...","object":"chat.completion.chunk",...}. Error message: [ { ... "path": [ "choices", 0, "delta", ... ] ... } ]
What it isA streamed chunk from the model provider that didn't match the shape the AI SDK expects, so the Assistant turn stops
Seen withMistral API (zai-glm-5-2), Gemini's OpenAI-compatible endpoint (generativelanguage.googleapis.com/v1beta/openai/)
Fixed in2.44.0 (thinking blocks), 2.46.0 (tool call without id), 2.49.0 / 3.3.0 (tool call without index)
Reports3 people on GitHub, 29 Aug to 8 Oct 2026 (#37352, #38953, #39339, #40646)
Checked5 Dec 2026, against the sources listed below

Match your error's path

Path and message in the errorCauseFixed in
"choices", 0, "delta", "content": expected string, received arrayMistral 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 undefinedMistral 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 undefinedGemini'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

  1. Update n8n to at least the version in the table for your path (2.49.0 or later covers all three).
  2. Check the model settings. The Assistant model comes from N8N_INSTANCE_AI_MODEL in provider/model form (for example mistral/zai-glm-5-2); a custom OpenAI-compatible server goes in N8N_INSTANCE_AI_MODEL_URL and its key in N8N_INSTANCE_AI_MODEL_API_KEY. That is the variable name in n8n's current source; the reporter of #38953 used N8N_INSTANCE_AI_MODEL_BASE_URL.
  3. Mistral URL: an n8n engineer in #38953: the default Mistral base URL ends in /v1 (https://api.mistral.ai/v1); for the EU endpoint try https://api.eu.mistral.ai/v1.
  4. 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

Sources

Read 5 Dec 2026. These tools change often: if a step no longer matches, the linked page wins.

Related free tools