For the complete documentation index, see llms.txt. This page is also available as Markdown.

Reasoning

Several models expose a separate reasoning (thinking) step. When it runs, the response carries the reasoning in reasoning_content on the message and a reasoning_tokens count under usage.completion_tokens_details, alongside the normal content.

The control differs by model family, so the table below is the quick reference. The sections that follow show each family in full.

Model family
Reasoning by default
How to turn on / off
Depth control

GLM 5.2

On

chat_template_kwargs: {"enable_thinking": true / false}

reasoning_effort: "high" or "max"

GLM 5.1, GLM 5-Turbo

On

chat_template_kwargs: {"enable_thinking": true / false}

No effort levels

DeepSeek V4 (Flash, Pro)

Off

chat_template_kwargs: {"thinking": true}

reasoning_effort: "high" or "max"

MiniMax M3

On (adaptive)

chat_template_kwargs: {"thinking_mode": "disabled"}

Modes only, no effort levels

Kimi K2.6, K2.7

On (always)

Not toggleable

None

DeepSeek V4 ships with reasoning off by default on TensorX so the standard request is fast and cheap. Turn it on per request with chat_template_kwargs: {"thinking": true}.

The key name is per family: GLM uses enable_thinking, DeepSeek V4 uses thinking, and MiniMax M3 uses thinking_mode. Sending the wrong key is silently ignored, which looks like the parameter "does nothing".

GLM (5.2, 5.1, 5-Turbo)

GLM models think by default. Turn thinking off with enable_thinking: false inside chat_template_kwargs:

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://api.tensorx.ai/v1"
)

# Thinking off (direct answer, no reasoning_content)
response = client.chat.completions.create(
    model="z-ai/glm-5.2",
    messages=[{"role": "user", "content": "What is 15% of 240?"}],
    extra_body={"chat_template_kwargs": {"enable_thinking": False}}
)

On GLM 5.2, reasoning_effort has two effective levels, "high" and "max". It is passed at the top level (OpenAI-standard):

"high" gives shorter reasoning, "max" gives the deepest. "low" and "medium" are accepted but map to "high". To skip reasoning entirely, use reasoning_effort: "none" or enable_thinking: false. GLM 5.1 and GLM 5-Turbo support on/off but not effort levels.

DeepSeek V4 (Flash, Pro)

DeepSeek V4 models default to non-thinking mode. Enable reasoning with thinking: true inside chat_template_kwargs:

Once thinking is on, control the depth with reasoning_effort, passed at the top level. There are two effective levels, "high" and "max":

"high" is the standard depth, "max" reasons the longest. "low" and "medium" are accepted but map to "high". reasoning_effort has no effect unless thinking: true is also set.

MiniMax M3

MiniMax M3 has three reasoning modes, set with thinking_mode inside chat_template_kwargs:

  • "enabled": always reason.

  • "adaptive": the model decides when to reason. This is the default.

  • "disabled": no reasoning, direct answer.

M3 uses thinking_mode, not thinking or enable_thinking, and the value is one of the three modes above. It does not take graded reasoning_effort levels, so use the modes to control reasoning.

Kimi (K2.6, K2.7)

Kimi models reason by default and cannot be toggled off. There is no enable_thinking or thinking flag to set. reasoning_content is always populated.

Last updated

Was this helpful?