Reasoning Control
For models that support reasoning (chain-of-thought), you can control the depth of reasoning with the reasoning_effort parameter.
Prerequisites
- An API key (get one here)
- OpenAI SDK installed (Quickstart)
- A reasoning-capable model (see table below)
What you'll learn:
- Which models support reasoning control
- How to use the
reasoning_effortparameter - How to disable reasoning for Qwen3 models
Supported Models
| Model | Reasoning Control |
|---|---|
| o1, o1-mini, o3, o3-mini, o4-mini | reasoning_effort parameter |
| Gemini 2.5 | reasoning_effort parameter |
| Claude 3.7, Claude 4 | reasoning_effort parameter |
| Qwen3 | /no_think prompt keyword |
Using reasoning_effort
- Python
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 reasoningmedium— Balanced reasoning depthhigh— 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
- Chat Completions — Standard chat API usage
- Function Calling — Connect reasoning models to external tools
- Streaming — Stream reasoning model responses