Reasoning
To enable reasoning, specify reasoning_effort in your API request and use one of the supported values.
Notes
- OpenAI does not expose actual reasoning tokens; you will not see them in the response.
- Deepseek reasoning models enable reasoning automatically; you do not need to set anything to turn it on.
- Reasoning content in responses appears under
reasoning_content.
Using Anthropic via OneRoute
- If the client specifies a
reasoning_effortstring ("low"/"medium"/"high"), OneRoute converts it to a numeric budget according to the table below.
Conversion table:
- "low" -> 1024
- "medium" -> 40968192
- "high" -> 16384
Using Vertex AI via OneRoute
- If the client specifies a
reasoning_effortstring ("low"/"medium"/"high"/"none"), OneRoute converts it to a budget according to the table below.
Conversion table:
- "none" -> 0
- "low" -> 1024
- "medium" -> 4096
- "high" -> 16384
Reasoning Code Example
import openai
client = openai.OpenAI(
api_key="sk-37fbb5a2-989a-4364-ac81-e58281d31e13",
base_url="https://gw.1route.ai/v1",
)
response = client.chat.completions.create(
model="MiniMax-M2.1",
messages=[
{"role": "user", "content": "Hi, how are you?"}
],
reasoning_effort="low"
)
print(response.choices[0].message.content)