[FEATURE]: Add disable_reasoning parameter for GLM/Cerebras thinking toggle #8442

Open
opened 2026-02-16 18:09:59 -05:00 by yindo · 1 comment
Owner

Originally created by @iamadamreed on GitHub (Feb 3, 2026).

Originally assigned to: @thdxr on GitHub.

Problem

GLM-4.5/4.6/4.7 and Cerebras models support disable_reasoning boolean parameter to control thinking/reasoning output. Currently no way to configure this in OpenCode agent settings.

  • Issue #3259 asked "How to disable thinking in GLM-4.6?" but closed without implementation
  • Useful for reducing tokens, faster responses, avoiding parsing bugs (#6486, #7779, #6708)

Proposed Solution

Add disable_reasoning as optional boolean in agent configuration:

{
  "agent": {
    "fast-build": {
      "model": "cerebras/zai-glm-4.7",
      "disable_reasoning": true
    }
  }
}

Benefits

  • Reduce token usage/costs for simple tasks
  • Faster responses when deep reasoning not needed
  • Avoids reasoning tag parsing issues
  • User control over thinking verbosity

Implementation Notes

  • Apply to GLM and Cerebras providers
  • Default: false (thinking enabled)
  • Parameter name matches GLM/Cerebras API spec
Originally created by @iamadamreed on GitHub (Feb 3, 2026). Originally assigned to: @thdxr on GitHub. ### Problem GLM-4.5/4.6/4.7 and Cerebras models support `disable_reasoning` boolean parameter to control thinking/reasoning output. Currently no way to configure this in OpenCode agent settings. - Issue #3259 asked "How to disable thinking in GLM-4.6?" but closed without implementation - Useful for reducing tokens, faster responses, avoiding parsing bugs (#6486, #7779, #6708) ### Proposed Solution Add `disable_reasoning` as optional boolean in agent configuration: ```json { "agent": { "fast-build": { "model": "cerebras/zai-glm-4.7", "disable_reasoning": true } } } ``` ### Benefits - Reduce token usage/costs for simple tasks - Faster responses when deep reasoning not needed - Avoids reasoning tag parsing issues - User control over thinking verbosity ### Implementation Notes - Apply to GLM and Cerebras providers - Default: `false` (thinking enabled) - Parameter name matches GLM/Cerebras API spec
Author
Owner

@github-actions[bot] commented on GitHub (Feb 3, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #3259: How to disable thinking in GLM-4.6? (closed request asking for the same feature)
  • #10320: Specify sub-agent variant (thinking lvl) from script for token economy (related request for thinking level control)

Feel free to ignore if these don't address your specific case.

@github-actions[bot] commented on GitHub (Feb 3, 2026): This issue might be a duplicate of existing issues. Please check: - #3259: How to disable thinking in GLM-4.6? (closed request asking for the same feature) - #10320: Specify sub-agent variant (thinking lvl) from script for token economy (related request for thinking level control) Feel free to ignore if these don't address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8442