Zum Inhalt springen

Reasoning Control

Dieser Inhalt ist für v1.0.0. Geh zur neuesten Version, um die aktuellste Dokumentation zu bekommen.

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

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

What you’ll learn:

  • Which models support reasoning control
  • How to use the reasoning_effort parameter
  • How to disable reasoning for Qwen3 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

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

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)