Incompatibility between AI Assistant and zai-glm-5-2 model served by Mistral API.
Hello,
Describe the problem/error/question
The error stems from an incompatibility between n8n 2.38.7 and the response format of zai-glm-5-2 via the Mistral API. The model sends streaming tool_calls with a missing or undefined id field, whereas n8n expects a string.
part of the docker compose file : # n8n Instance AI / Assistant — Mistral API N8N_INSTANCE_AI_MODEL_BASE_URL: https://api.eu.mistral.ai N8N_INSTANCE_AI_MODEL: mistral/zai-glm-5-2 N8N_INSTANCE_AI_MODEL_API_KEY: ${MISTRAL_API_KEY}
What is the error message (if any)?
Type validation failed: Value: {"id":"f53b27e4a14b421b9468ce06900be52c","object":"chat.completion.chunk","created":1789640244,"model":"zai-glm-5-2","choices":[{"index":0,"delta":{"tool_calls":[{"type":"function","function":{"name":"","arguments":""}"},"index":0}],"index":0,"content":""},"finish_reason":null,"logprobs":null}]}. Error message: [ { "expected": "string", "code": "invalid_type", "path": [ "choices", 0, "delta", "tool_calls", 0, "id" ], "message": "Invalid input: expected string, received undefined" } ]
Please share your workflow/screenshots/recording
it's an issue in the AI Assistant.
Share the output returned by the last node
it's an issue in the AI Assistant.
Debug info
core
- n8nVersion: 2.38.7
- platform: docker (self-hosted)
- nodeJsVersion: 26.7.0
- nodeEnv: production
- database: postgres
- executionMode: scaling (single-main)
- concurrency: -1
- license: community
storage
- success: all
- error: all
- progress: false
- manual: true
- binaryMode: database
pruning
- enabled: true
- maxAge: 336 hours
- maxCount: 10000 executions
client
- userAgent: mozilla/5.0 (x11; ubuntu; linux x86_64) applewebkit/537.36 (khtml, like gecko) chrome/152.0.0.0 safari/537.36
- isTouchDevice: false
Generated at: 2026-09-17T10:16:38.929Z
Source: n8n-io/n8n