[FEATURE]: Add thinking/reasoning support for GLM-4.7, Kimi K2.5, and MiniMax M2.1 on Zen #8659

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

Originally created by @ErdongChen61 on GitHub (Feb 5, 2026).

Originally assigned to: @fwang on GitHub.

The Zen gateway currently rejects thinking/reasoning config for GLM-4.7 (paid), Kimi K2.5 (paid), and MiniMax M2.1 (paid). All three models support thinking natively in their weights and via their direct provider APIs.

#### Steps to reproduce

  Tested via `opencode.json` model config with three configurations across all four Zen
  models.

  **Config A — Thinking + interleaved:**
  ```json
  {
    "provider": {
      "opencode": {
        "models": {
          "<model>": {
            "options": {
              "thinking": { "type": "enabled", "budgetTokens": 16000 },
              "interleaved": { "field": "reasoning_content" }
            }
          }
        }
      }
    }
  }

  Config B — Thinking only (no interleaved):
  "options": {
    "thinking": { "type": "enabled", "budgetTokens": 16000 }
  }

  Config C — No config (empty model entry):
  "<model>": {}

  Test command:
  timeout 60 opencode run "What is 2+2? Think step by step." -m opencode/<model> --format
  json

  Results:
  ┌───────────────────┬──────────────────────────┬────────────────────┬──────────────────┐
  │       Model       │  Config A (thinking +    │ Config B (thinking │  Config C (no    │
  │                   │       interleaved)       │        only)       │     config)      │
  ├───────────────────┼──────────────────────────┼────────────────────┼──────────────────┤
  │ kimi-k2.5-free    │ Works (reasoning > 0)    │ Works (reasoning > │ Works            │
  │                   │                          │  0)                │ (reasoning: 0)   │
  ├───────────────────┼──────────────────────────┼────────────────────┼──────────────────┤
  │ kimi-k2.5 (paid)  │ Rejected                 │ Rejected           │ Works            │
  │                   │                          │                    │ (reasoning: 0)   │
  ├───────────────────┼──────────────────────────┼────────────────────┼──────────────────┤
  │ glm-4.7 (paid)    │ Rejected                 │ Rejected           │ Works            │
  │                   │                          │                    │ (reasoning: 0)   │
  ├───────────────────┼──────────────────────────┼────────────────────┼──────────────────┤
  │ minimax-m2.1      │ Rejected                 │ Rejected           │ Works            │
  │ (paid)            │                          │                    │ (reasoning: 0)   │
  └───────────────────┴──────────────────────────┴────────────────────┴──────────────────┘
  Error messages:
  - glm-4.7: Extra inputs are not permitted, field: 'thinking' — Zen doesn't recognize the
   field at all
  - kimi-k2.5 (paid) and minimax-m2.1: Input should be 'disabled', field:
  'thinking.ThinkingConfigDisabled.type' — field exists but only accepts disabled

  Only kimi-k2.5-free accepts thinking config (both A and B) and returns reasoning tokens.
   All three paid models reject it.
Originally created by @ErdongChen61 on GitHub (Feb 5, 2026). Originally assigned to: @fwang on GitHub. The Zen gateway currently rejects thinking/reasoning config for GLM-4.7 (paid), Kimi K2.5 (paid), and MiniMax M2.1 (paid). All three models support thinking natively in their weights and via their direct provider APIs. ``` #### Steps to reproduce Tested via `opencode.json` model config with three configurations across all four Zen models. **Config A — Thinking + interleaved:** ```json { "provider": { "opencode": { "models": { "<model>": { "options": { "thinking": { "type": "enabled", "budgetTokens": 16000 }, "interleaved": { "field": "reasoning_content" } } } } } } } Config B — Thinking only (no interleaved): "options": { "thinking": { "type": "enabled", "budgetTokens": 16000 } } Config C — No config (empty model entry): "<model>": {} Test command: timeout 60 opencode run "What is 2+2? Think step by step." -m opencode/<model> --format json Results: ┌───────────────────┬──────────────────────────┬────────────────────┬──────────────────┐ │ Model │ Config A (thinking + │ Config B (thinking │ Config C (no │ │ │ interleaved) │ only) │ config) │ ├───────────────────┼──────────────────────────┼────────────────────┼──────────────────┤ │ kimi-k2.5-free │ Works (reasoning > 0) │ Works (reasoning > │ Works │ │ │ │ 0) │ (reasoning: 0) │ ├───────────────────┼──────────────────────────┼────────────────────┼──────────────────┤ │ kimi-k2.5 (paid) │ Rejected │ Rejected │ Works │ │ │ │ │ (reasoning: 0) │ ├───────────────────┼──────────────────────────┼────────────────────┼──────────────────┤ │ glm-4.7 (paid) │ Rejected │ Rejected │ Works │ │ │ │ │ (reasoning: 0) │ ├───────────────────┼──────────────────────────┼────────────────────┼──────────────────┤ │ minimax-m2.1 │ Rejected │ Rejected │ Works │ │ (paid) │ │ │ (reasoning: 0) │ └───────────────────┴──────────────────────────┴────────────────────┴──────────────────┘ Error messages: - glm-4.7: Extra inputs are not permitted, field: 'thinking' — Zen doesn't recognize the field at all - kimi-k2.5 (paid) and minimax-m2.1: Input should be 'disabled', field: 'thinking.ThinkingConfigDisabled.type' — field exists but only accepts disabled Only kimi-k2.5-free accepts thinking config (both A and B) and returns reasoning tokens. All three paid models reject it. ```
yindo added the zen label 2026-02-16 18:10:31 -05:00
Author
Owner

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

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

  • #11987: [FEATURE] Add disable_reasoning parameter for GLM/Cerebras thinking toggle
  • #11787: Add missing NanoGPT models (kimi-k2.5:thinking and others)
  • #6708: GLM 4.7 on Zen coding plan puts tool calls inside the thinking/reasoning tag
  • #7779: GLM 4.7 thinking process not properly formatted - missing leading tags
  • #6486: Error "reasoning part reasoning-0 not found" from tool calls using GLM 4.5
  • #4033: MiniMax M2 tags rendering
  • #11709: Latest v1.1.48 Version Analysis: Think Tag Issues with Local Model MiniMax2.1
  • #7953: [FEATURE] Please add the new GLM 4.7 and MiniMax M2.1 models to Nvidia
  • #12090: Kimi K2.5 can't enable thinking (reasoning_content missing) - CLOSED

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Feb 5, 2026): This issue might be a duplicate of existing issues. Please check: - #11987: [FEATURE] Add disable_reasoning parameter for GLM/Cerebras thinking toggle - #11787: Add missing NanoGPT models (kimi-k2.5:thinking and others) - #6708: GLM 4.7 on Zen coding plan puts tool calls inside the thinking/reasoning tag - #7779: GLM 4.7 thinking process not properly formatted - missing leading tags - #6486: Error "reasoning part reasoning-0 not found" from tool calls using GLM 4.5 - #4033: MiniMax M2 <think> tags rendering - #11709: Latest v1.1.48 Version Analysis: Think Tag Issues with Local Model MiniMax2.1 - #7953: [FEATURE] Please add the new GLM 4.7 and MiniMax M2.1 models to Nvidia - #12090: Kimi K2.5 can't enable thinking (reasoning_content missing) - CLOSED Feel free to ignore if none of these 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#8659