Reasoning
Reasoning
Reasoning models think before answering. reasoning_effort is the portable control: the gateway translates it into the model's own dial — a level, an on/off switch or a thinking-token budget — and the other spellings in the table below are translated the same way, so you can send the one your client library already uses.
| Parameter | Type | Required | Description |
|---|---|---|---|
| reasoning_effort | string | Optional | How much the model should think. none turns thinking off on models that can stop thinking. One of:noneminimallowmediumhighxhighmax Mapped to the level the model uses for it where the model's levels are known (sometimes a higher level than the word asked for, or off; when it differs, dropped_params names the level used); otherwise passed on as sent. |
| thinking | object | Optional | {type: "enabled"|"adaptive"|"disabled", budget_tokens}. Taken as is by models whose own API uses it, and translated for every other reasoning model: {type: "disabled"} or a budget of 0 turns thinking off, and a budget becomes an effort level where the model takes levels. |
| reasoning | object | Optional | {effort, max_tokens, enabled, exclude}. Translated like reasoning_effort: enabled: false, effort: "none" or max_tokens: 0 turns thinking off. exclude: true leaves the readable reasoning text out of the response; signed or encrypted reasoning that a tool loop must send back is kept. |
| chat_template_kwargs | object | Optional | {enable_thinking: false} turns thinking off, as do the top-level enable_thinking: false and think: false. |
import os from openai import OpenAI client = OpenAI( api_key=os.environ["OXYY_API_KEY"], base_url="https://api.oxyy.ai/v1" ) response = client.chat.completions.create( model="claude-opus-4-8", messages=[{"role": "user", "content": "Prove that sqrt(2) is irrational."}], reasoning_effort="high", # none | minimal | low | medium | high | xhigh | max ) msg = response.choices[0].message print(msg.reasoning_content) # the model's thinking, when it emits any print(msg.content) print(response.usage.completion_tokens_details.reasoning_tokens)
# A thinking budget works on any reasoning model; where the model takes # effort levels instead, the budget is sent as the level the model uses for it. curl https://api.oxyy.ai/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $OXYY_API_KEY" \ -d '{ "model": "claude-opus-4-8", "messages": [{"role": "user", "content": "Plan a migration."}], "max_tokens": 8000, "thinking": {"type": "enabled", "budget_tokens": 4000} }'
# Turn thinking off. Equivalent spellings are translated the same way: # "thinking": {"type": "disabled"}, "reasoning": {"enabled": false}, ... # A model that always reasons answers at its lowest level instead, and # provider_specific_fields.dropped_params on the response says so. curl https://api.oxyy.ai/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $OXYY_API_KEY" \ -d '{ "model": "claude-opus-4-8", "messages": [{"role": "user", "content": "Summarise this in one line."}], "reasoning_effort": "none" }'
Turning thinking off, and models that cannot. Send
reasoning_effort: "none", or any off spelling above. Some models always reason: for them an off request is answered at the model's lowest effort level, or at its default when it has no levels. GET /v1/models/{id} says which: its reasoning object reports can_disable, always_on, the efforts that do something on that model, its default_effort and the off_request that turns thinking off. It is null for a model that does not reason, and for one whose thinking controls are its own API's (translated as described above).What changed is reported, not hidden. Every adjustment the gateway makes to your thinking controls — a level sent as the model's nearest one, a spelling replaced by the switch the model takes, two spellings that disagree, an off request a model cannot honour — is listed with its reason in
provider_specific_fields.dropped_params on the response.| Field on the response | What it is |
|---|---|
message.reasoning_content | The thinking, as text, when the model emits any |
message.reasoning_details | Structured reasoning blocks. Send them back unmodified in a tool loop so signatures and encrypted reasoning survive. |
usage.completion_tokens_details.reasoning_tokens | Thinking tokens, counted inside completion_tokens and billed at the output rate |
usage.completion_tokens_details.reasoning_tokens_source | "estimate" when the model's provider reported no reasoning count but the response carried reasoning text: reasoning_tokens was then counted by the gateway from that text. completion_tokens, total_tokens and the charge are unchanged. Absent when the count is the provider's own. |
