Skip to main content
Reasoning models spend additional compute “thinking through” a problem before producing a response. This extended deliberation makes them significantly better at complex tasks like multi-step math, code debugging, strategic planning, and hard classification problems where a direct answer is often wrong.
Reasoning models supported through Routeway include GPT 5.4, Claude Opus 4.8, DeepSeek V4 and much more. Check the Models page for the current list.

Enabling Reasoning

By default, Routeway disables reasoning for models. There are two ways to enable it:

Option 1: Model Suffix

Append :thinking to the end of the model ID to enable reasoning with the default effort level.
response = client.chat.completions.create(
    model="claude-opus-4-5:thinking",
    messages=[{"role": "user", "content": "Solve this step by step..."}]
)
You can also specify the effort level directly in the suffix using :high, :medium, or :low:
# High effort reasoning
response = client.chat.completions.create(
    model="o4-mini:thinking:high",
    messages=[{"role": "user", "content": "Prove that there are infinitely many primes."}]
)

# Low effort reasoning
response = client.chat.completions.create(
    model="o4-mini:thinking:low",
    messages=[{"role": "user", "content": "What is 2 + 2?"}]
)

Option 2: reasoning_effort Parameter

Pass the reasoning_effort parameter in the request body to enable reasoning and control the effort level:
response = client.chat.completions.create(
    model="o4-mini",
    messages=[{"role": "user", "content": "Explain the Riemann hypothesis."}],
    reasoning_effort="high"
)
Both approaches achieve the same result. The model suffix is convenient for quick testing or when there is no way to change reasoning level via ui, while reasoning_effort gives you programmatic control without changing the model ID.

When to Use Reasoning Models

Use reasoning for

  • Multi-step math or logic puzzles
  • Debugging complex code
  • Long-horizon planning and strategy
  • Hard classification with many edge cases
  • Tasks where chain-of-thought improves accuracy

Skip reasoning for

  • Simple Q&A or retrieval
  • Short creative tasks
  • High-throughput, latency-sensitive pipelines
  • Tasks where standard models already perform well

Controlling Reasoning Effort

You can control reasoning effort using the reasoning_effort parameter.
ValueBehaviorBest for
"low"Minimal reasoning, fastestSimple tasks, cost-sensitive
"medium"Balanced (default)Most production use cases
"high"Deep reasoning, slowestHard math, complex code, critical decisions
"none"No reasoning, fastestSimple Q&A or retrieval
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.routeway.ai/v1",
    api_key=os.getenv("ROUTEWAY_API_KEY")
)

response = client.chat.completions.create(
    model="o4-mini",
    messages=[
        {
            "role": "user",
            "content": "A farmer has 17 sheep. All but 9 run away. How many sheep does the farmer have left? Show your reasoning."
        }
    ],
    reasoning_effort="medium",
)

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