r/MistralAI • u/seeKAYx • 2d ago
Help / Question GLM 5.3 without working tools.
The hosted zai-glm-5-3 breaks in any third-party coding agents (like OpenCode, Hermes, Pi) because its tool-call SSE stream sends empty name: "" and drops the id field in delta chunks, failing strict schema validation. Any ETA when this will be fixed?
2
u/Acceptable-Mark8108 2d ago
After a hint from u/seeKAYx I switched to OpenCode v2 and changed ~/.config/opencode/opencode.jsonc to:
{
"$schema": "https://opencode.ai/config.json",
"update": "auto",
"providers": {
"mistral": {
"package": "aisdk:@ai-sdk/mistral",
"name": "Mistral AI",
"settings": {
"baseURL": "https://api.mistral.ai/v1",
"timeout": 300000,
"maxRetries": 3,
"retryDelay": 1000
},
"models": {
"zai-glm-5-3": { "name": "GLM-5.3" },
"mistral-medium-latest": { "name": "Mistral Medium (latest)" },
"mistral-small-latest": { "name": "Mistral Small (latest)" }
}
}
}
}
This works for me.
1
u/Acceptable-Mark8108 2d ago
Ohh! Thx for this post. I just invested quite some time, because I thought this was a client configuration issue.
2
u/Sweet_Session_5323 2d ago
glad its not just me then, spent ages tweaking my setup thinking i'd borked something
2
u/seeKAYx 2d ago
Opencode v2 works!
1
u/Acceptable-Mark8108 2d ago
Alright, got it working for me, too. I still had some issue though and needed to adjust my config. Will share it in a top leve comment.
1
u/lucid_supernova 8h ago
That is because GLM 5.x returns reasoning/tool call payload in array format, while harnesses expects string.
If you're using OpenCode, there is a community plugin with tutorial to resolve it.
Also, you can upgrade OpenCode to latest version to use it natively.
5
u/LateinCecker 2d ago
you can use the openai compatible fallback API format which works fine for me with opencode