Description
Using nvidia/z-ai/glm-5.1, the provider can return finish_reason: "tool_calls" while omitting both the tool call id and function.name from the streamed payload. When that happens during memory bootstrap, opencode can end up stalling instead of either recovering or failing clearly.
This looks like a provider payload issue, but opencode should still handle it more gracefully.
Related reports: #25786, #24137, #6649, #10885.
Plugins
cth.mcp.memory
OpenCode version
0.0.0-dev-202605060426
Steps to reproduce
- Configure
nvidia/z-ai/glm-5.1.
- Run
opencode run --format json --dangerously-skip-permissions -m nvidia/z-ai/glm-5.1 "check your memory".
- Observe that the model enters a tool-call path where the provider may emit arguments without a tool name/id, and the session can stall instead of resolving into a usable tool call or a clear error.
A representative malformed streamed payload looked like:
{
"finish_reason": "tool_calls",
"delta": {
"tool_calls": [
{
"function": {
"arguments": "{}"
}
}
]
}
}
Screenshot and/or share link
N/A
Operating System
Windows 11
Terminal
PowerShell 7 / Windows Terminal
Description
Using
nvidia/z-ai/glm-5.1, the provider can returnfinish_reason: "tool_calls"while omitting both the tool callidandfunction.namefrom the streamed payload. When that happens during memory bootstrap, opencode can end up stalling instead of either recovering or failing clearly.This looks like a provider payload issue, but opencode should still handle it more gracefully.
Related reports: #25786, #24137, #6649, #10885.
Plugins
cth.mcp.memoryOpenCode version
0.0.0-dev-202605060426Steps to reproduce
nvidia/z-ai/glm-5.1.opencode run --format json --dangerously-skip-permissions -m nvidia/z-ai/glm-5.1 "check your memory".A representative malformed streamed payload looked like:
{ "finish_reason": "tool_calls", "delta": { "tool_calls": [ { "function": { "arguments": "{}" } } ] } }Screenshot and/or share link
N/A
Operating System
Windows 11
Terminal
PowerShell 7 / Windows Terminal