Skip to main content
Version: Latest

Reasoning Control

For models that support reasoning (chain-of-thought), you can control the depth of reasoning with the reasoning_effort parameter.

Prerequisites

What you'll learn:

  • Which models support reasoning control
  • How to use the reasoning_effort parameter
  • How to disable reasoning for Qwen3 models

Supported Models

ModelReasoning Control
o1, o1-mini, o3, o3-mini, o4-minireasoning_effort parameter
Gemini 2.5reasoning_effort parameter
Claude 3.7, Claude 4reasoning_effort parameter
Qwen3/no_think prompt keyword

Using reasoning_effort

from openai import OpenAI

client = OpenAI()

response = client.chat.completions.create(
model="claude-sonnet-4",
messages=[
{"role": "system", "content": "You are a concise and helpful assistant."},
{"role": "user", "content": "What is the capital of France?"},
],
reasoning_effort="low", # "low", "medium", or "high"
)

print(response.choices[0].message.content)

The reasoning_effort parameter accepts three values:

  • low — Fast responses, minimal reasoning
  • medium — Balanced reasoning depth
  • high — Deep reasoning for complex problems

Disabling Reasoning for Qwen3

For Qwen3 models, prepend /no_think to your prompt to disable reasoning:

from openai import OpenAI

client = OpenAI()

response = client.chat.completions.create(
model="Qwen3-30B-A3B-FP8",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "/no_think What is your name?"},
],
)

print(response.choices[0].message.content)

Next Steps

© Deutsche Telekom AG