Skip to content

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

Closed

Description

@ErdongChen61

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.

Activity

  1. github-actions commented on Feb 6, 2026

    @github-actions
    Contributor

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

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

  2. github-actions commented on Apr 7, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

zenRelates to Zen

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions