You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GLM 4.7 thinking process not properly formatted - missing leading tags #7779
When using GLM 4.7 model, the thinking process is not being properly formatted. The opening tag (e.g., <think>) at the beginning of the thinking content is missing, causing all reasoning output to appear as plain text in the UI.
Expected Behavior
The thinking process should be wrapped with proper tags like:
<think>
[reasoning content]
</think>
This allows the UI to properly hide/display the thinking content.
Actual Behavior
Only the closing tag is present, or the entire reasoning appears as plain text without any formatting. The opening <think> tag is missing from the beginning of the thinking process.
Steps to Reproduce
Configure opencode to use GLM 4.7 model (Zhipu AI)
Ask a question that triggers tool usage or complex reasoning
Observe the output - the thinking process appears as plain text instead of being properly formatted
Environment
Model: Zhipu GLM-4.7
Provider: Custom/Local LLM provider using vLLM or similar
Additional Context
This may be related to how the streaming response is parsed for GLM 4.7, specifically in the JSON parsing logic that handles reasoning_content fields.
Hi, this issue is related to how you serve your local LLM.
Your inference server (llama.cpp? Vllm?) needs to be correctly configured with the prompt template and to serve the correct fields of reasoning_content etc (depends on the API, completions/responses)
Activity
github-actions commentedon Jan 11, 2026
This issue might be a duplicate of existing issues. Please check:
signatureinthinkingblock #6418: Invalidsignatureinthinkingblock - thinking tag format errors when switching models from GLM 4.7Feel free to ignore if none of these address your specific case.
goniz commentedon Jan 11, 2026
Hi, this issue is related to how you serve your local LLM.
Your inference server (llama.cpp? Vllm?) needs to be correctly configured with the prompt template and to serve the correct fields of reasoning_content etc (depends on the API, completions/responses)
pawanjenu commentedon Jan 18, 2026
facing the same issue. I use VLLM
bsdayo commentedon Feb 2, 2026
For vLLM users, you need to add
--reasoning-parser glm45to yourvllm servecommand.Example:
vllm serve GadflyII/GLM-4.7-Flash-NVFP4 \ --enable-auto-tool-choice \ --tool-call-parser glm47 \ --reasoning-parser glm45References:
github-actions commentedon Apr 4, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.
fix: render think tags as reasoning blocks + fix MCP MaxListeners ove…