Skip to main content
Deep Thinking is an advanced reasoning feature that enables Chain of Thought mechanisms, allowing the model to perform deep analysis and reasoning before answering questions. This approach significantly improves the model’s accuracy and interpretability in complex tasks, particularly suitable for scenarios requiring multi-step reasoning, logical analysis, and problem-solving.

Features

The Deep Thinking feature currently supports the latest models in the GLM-5.2 GLM-5.1 GLM-5 GLM-5-Turbo GLM-5V-Turbo GLM-4.5 GLM-4.6 GLM-4.7 series. By enabling deep thinking, the model can:
  • Multi-step Reasoning: Break down complex problems into multiple steps for gradual analysis and resolution
  • Logical Analysis: Provide clear reasoning processes and logical chains
  • Improved Accuracy: Reduce errors and improve answer quality through deep thinking
  • Enhanced Interpretability: Display the thinking process to help users understand the model’s reasoning logic
  • Intelligent Judgment: The model automatically determines whether deep thinking is needed to optimize response efficiency

Core Parameters

  • thinking.type: Controls the deep thinking mode
    • enabled (default): Enable dynamic thinking. The model automatically determines whether to think: GLM-5.2, GLM-5.1, GLM-5, GLM-5-Turbo, GLM-5V-Turbo, GLM-4.6, and GLM-4.5 auto-decide whether to think, while GLM-4.7 and GLM-4.5V use forced thinking
    • disabled: Disable deep thinking, provide direct answers
  • reasoning_effort: Controls the reasoning effort level when chain-of-thought thinking is enabled, only supported by GLM-5.2 and above
    • Allowed values: max (default and recommended, deep reasoning), xhigh, high (enhanced reasoning), medium, low, minimal, none
    • none or minimal: Model skips thinking; low / medium are mapped to high; xhigh is mapped to max
  • model: Models that support deep thinking, such as glm-5.2, glm-5.1, glm-5, glm-4.7, glm-4.6, glm-4.5, glm-4.5v, etc.

Code Examples

Basic Call (Enable Deep Thinking)
Streaming Call (Deep Thinking + Streaming Output)
Control Reasoning Effort (reasoning_effort)
Disable Deep Thinking

Response Example

Response format with deep thinking enabled:

Best Practices

Recommended scenarios to enable:
  • Complex problem analysis and solving
  • Multi-step reasoning tasks
  • Technical solution design
  • Strategy planning and decision
  • Academic research and analysis
  • Creative writing and content creation
Can be disabled scenarios:
  • Simple fact query
  • Basic translation tasks
  • Simple classification judgment
  • Quick question and answer requirements

Application scenarios

Academic Research

  • Research method design
  • Data analysis and explanation
  • Theory deduction and proof

Technology Consulting

  • System architecture design
  • Technological scheme evaluation
  • Problem diagnosis and solution

Business Analysis

  • Market trends analysis
  • Business model design
  • Investment decision support

Education Training

  • Complex concept explanation
  • Learning path planning
  • Knowledge system building

Notes

  1. Response time:Enable deep thinking will increase response time, particularly for complex tasks
  2. Token consumption:Thinking process will consume extra tokens, please manage your tokens
  3. Model support:Ensure you’re using models that support deep thinking
  4. Task matching:Choose whether to enable deep thinking according to the task complexity
  5. Streaming output:Combine streaming output to see the thinking process, improving user experience