- decide how much reasoning each task needs
- read a model’s reasoning behaviour from the catalog
- size the output limit so answers aren’t cut off
- stream long generations and set timeouts
- detect and fix a cut-off answer
- handle reasoning you show to users, and reasoning across turns
Decide how much reasoning each task needs
More effort usually helps on multi-step problems, careful analysis and code, and buys little on lookups, short rewrites and classifications. Effort is the main control over how long a model thinks, and so over its cost and latency; see When More Effort Is Worth It.- Set an effort on every request rather than relying on the model’s own behaviour. Many models reason when you send nothing, and you pay for that reasoning as output tokens.
- Choose per task, not per app. A router that picks
lowfor short questions andhighfor analysis spends far less than one setting for everything. - Turn reasoning off where you can and should. For fast, short tasks, send
none(reasoning_effort: "none"on Chat Completions,reasoning: {"effort": "none"}on Responses) to a model that can turn reasoning off. - Measure before you raise it. Run your test set at two efforts and compare quality,
usageand time. Iflowpasses, keep it. See Testing, Evaluation and Observability.
Read the model’s behaviour from the catalog
Each model in the model catalog has areasoning object, or null when it doesn’t reason. Read it before you choose settings:
A level the model doesn’t list normally isn’t refused: it runs at the nearest level the model has, and the response lists it in
ignored_params (on Gemini 2.5 models, xhigh and max can be refused with a 400, so send high). Check ignored_params in development so you know the effort you sent is the one that ran. See Effort levels.
wanted is none and the helper returns nothing, check thinks_by_default: if it’s false, sending no effort already means no reasoning; if it’s true, the model can’t be told not to reason, so pick a model with can_disable: true if the task must be fast and cheap.
Size the output limit for thinking and answer together
On a reasoning model, the output limit (max_tokens on Chat Completions, max_output_tokens on Responses) holds the thinking and the answer. A limit sized for the answer alone, such as 500, can be used up by thinking before the answer starts.
- Start generous, then tighten. Begin from the table in Size the limit, or leave the limit unset on Chat Completions, then lower it once
usagefrom real requests shows how much your task needs. - Size per task. A classification and a long report need very different limits.
- Don’t carry limits over from models that don’t reason, and recheck them when you change models or efforts.
- Lower the effort, not the limit, to save tokens. You’re billed for the tokens the model uses, not for the limit, so a smaller limit doesn’t make the model think less; it cuts the answer off.
- Know the ceiling. A model’s
max_output_tokensin the catalog is the most it can produce, thinking and answer together.
Stream long generations and set timeouts
A high effort with a large limit can take minutes.- Stream anything long. A non-streamed request that runs past Gloo’s response deadline fails with
3007 / GATEWAY_DEADLINE(408on guarded and grounded endpoints,504with the codegateway_deadlineon direct). It isn’t retryable: the same request meets the same deadline. Streaming avoids it and shows progress as it comes. See 504 Gateway Timeout. - Set your own timeouts to match. For a non-streamed request, give your HTTP client a total timeout longer than your slowest expected answer. For a stream, use a timeout between events rather than a total timeout, so a long but healthy stream isn’t cut off.
- Show that the model is thinking. Streams can carry the reasoning before the answer when you set an effort (and
reasoning.summaryon Responses). Even when you don’t show the text, a “thinking” indicator tells users the request is alive. - Know what a cancelled stream costs. Stopping a stream partway doesn’t always stop the bill for thinking already done. See Cancelled and failed streams.
Detect and fix a cut-off answer
Check that a response finished before you use it. A response that reached the limit says so:- Chat Completions:
finish_reason: "length". - Responses:
status: "incomplete"withincomplete_details.reasonset to"max_output_tokens".
Handle reasoning you show to users
- Treat reasoning as optional. It comes back only when the model reasoned, and some models skip reasoning on easy questions even when you ask for it. Don’t make your UI depend on it.
- Reasoning isn’t moderated. On the guarded endpoints, moderation checks the answer, not the reasoning. On direct endpoints, nothing reviews either. If you show reasoning to end users, review it yourself or don’t show it. See Reasoning is not moderated.
- Don’t build on reasoning text. It’s a summary or raw thinking for people to read, not a stable format for code to parse. Put anything your code needs in the answer, or in a tool call.
Reasoning across turns
Send the full conversation each turn, as text and output items. Reasoning from earlier turns isn’t carried forward: the model reasons afresh each turn, and reasoning items you send back are removed and reported. Don’t rely onprevious_response_id or encrypted reasoning to keep the model’s thinking between turns. See Reasoning across turns and Conversations and Context Windows.
Summary
Next steps
Reasoning guide
Settings, effort levels and every model family’s behaviour.
Reasoning tutorial
Pick an effort, read the reasoning back and size the limit, step by step.
Models That Think Before They Answer
The lesson: what reasoning is and when it helps.
Controlling Cost
Reasoning tokens, caching and the other levers on your bill.

