Skip to main content
Reasoning is a model working through a problem before it answers. On the Responses and Chat Completions endpoints (guarded, grounded and direct), you control it with provider-neutral settings that work the same way for every model family: reasoning_effort and the reasoning object. Gloo translates them for Claude, Gemini, OpenAI and open-weight models. New to reasoning models? Models That Think Before They Answer explains what reasoning is, how it differs from asking a model to think step by step, and when more effort pays off.
Using the Anthropic SDK? Anthropic Messages doesn’t use these settings. It uses Anthropic’s own thinking parameters, thinking and output_config.effort, which have their own defaults. See Thinking. On the endpoints on this page, a thinking field has no effect (Direct Completions lists it in ignored_params).
What you get back depends on the model. Claude, Gemini and OpenAI models return the provider’s summary of their reasoning, not the full chain of thought. Open-weight models such as DeepSeek, GLM and gpt-oss return their raw reasoning text.

The settings

Each model takes only some of the effort levels; see Effort levels. Reasoning comes back only when the model reasoned. Claude 5 models decide how much each request needs and can skip reasoning on easy ones, so even with an effort and summary set, an answer can arrive with no reasoning. Treat reasoning as optional when you read the response.

What happens when you send nothing

Every reasoning setting is optional. With none, each model follows its provider’s default, and the model catalog says which:
  • Reasoning by default is billed. You pay for it as output tokens, even though you didn’t ask for it. See Set your output limit for reasoning models.
  • You usually don’t see it. With no effort set, the reasoning isn’t returned. The exception is Direct Completions, where open-weight models that always reason can stream their reasoning anyway.
  • Check any model in the catalog. thinks_by_default says whether it reasons when you send nothing, and can_disable whether it can answer without reasoning:

Effort levels

Every endpoint accepts the same levels, from least to most reasoning: none, minimal, low, medium, high, xhigh, max
  • Send a level the model lists. Each model’s levels are in its reasoning.effort_levels in the model catalog. Claude 5 models take low to max, for example, and GPT-5.4 takes none, low, medium, high and xhigh. A listed level runs as you sent it.
  • A level the model doesn’t list, other than none, runs at the nearest level below it that the model lists, or at the model’s lowest level when none is below, and is listed in ignored_params. For example, minimal on a Claude 5 model runs as low, xhigh on Gemini 3.8 Flash runs as high, and max on GPT-5.4 runs as xhigh. A value that isn’t one of the seven levels isn’t refused: no effort is sent, and the value is listed.
  • none asks for no reasoning. It turns reasoning off on models that can (can_disable: true in the catalog). On such a model that doesn’t list none and doesn’t reason unless asked, such as Gemini 3.1 Flash-Lite, no effort is sent, so it answers without reasoning and nothing is listed. On other models, such as Claude 5, Gemini 3.8 Flash and gpt-oss, the model runs at its lowest level, no reasoning comes back, and none is listed in ignored_params. On Claude 5, an answer from a fallback provider may still include reasoning. The reasoning the model did is still billed.
  • A model with no graded levels (effort_levels is [] or ["none"]) decides by itself how much it reasons. On a model that reasons by default, a graded effort such as high isn’t sent and is listed in ignored_params; on one that reasons only when asked, it turns reasoning on at the model’s default and is listed. none turns its reasoning off when the list includes none.

Efforts that don’t run as sent

When an effort isn’t applied as you sent it, the non-streamed response lists it in ignored_params, beside the reason:
  • Chat Completions names the entry reasoning_effort=<level>; Responses names it reasoning.effort=<level>.
  • On a stream, the X-Ignored-Params response header lists the names only, without values, for example X-Ignored-Params: reasoning_effort.
  • Match on params, not on reason. The reason text can differ when the list also holds a parameter the endpoint doesn’t forward to the provider.
  • An effort the model lists in effort_levels runs as sent and is not listed, and a request with no effort gets no entry.

The nested reasoning form on Chat Completions

The chat endpoints also accept the nested form that OpenAI’s Responses API uses, "reasoning": {"effort": "high", "summary": "auto"}. Its effort works the same as "reasoning_effort": "high":
  • If you send both, reasoning_effort wins. A different nested effort it overrode is listed in ignored_params as reasoning.effort=<value>.
  • Only the levels above are read. Any other nested effort, such as auto, is not sent to the model and is listed as reasoning.effort=<value>.
  • enabled is read too. "enabled": false works like "reasoning_effort": "none", and "enabled": true asks the model to reason at its default level.
  • Other keys are not applied. Keys such as max_tokens are listed as reasoning.<key>=<value>, and the request still runs.
  • summary rides on an effort. Beside an effort that reaches the model, summary is passed on, and "none" asks for no summary. A summary sent with no effort turns nothing on: no reasoning comes back, and it is listed as reasoning.summary=<value>.

Pick an effort from the model catalog

GET /platform/v2/models returns a reasoning object on every model that reasons, and null on every model that doesn’t:
To be sure of the level you get, send the level you want if the model lists it, otherwise the nearest listed level:

What comes back

Chat Completions

A non-streamed answer carries the reasoning in message.reasoning_content:
A stream sends the reasoning as delta.reasoning_content chunks before the first answer chunk (chunks trimmed):
Streamed reasoning works the same on every chat endpoint: guarded, grounded and direct. With no effort, or with none, the guarded and grounded streams carry no reasoning, as before. On Direct Completions, models that always reason can stream reasoning without an effort, as they did before.

Responses

On the Responses endpoints, set reasoning.summary (auto, concise or detailed) to get the reasoning back. An effort alone makes the model think but returns no summary, streamed or not. A summary alone is what turns on a reasoning stream, but the model reasons only if you also set an effort or it reasons by default. Some non-streamed responses still carry a reasoning item without reasoning.summary: Gemini models with an effort, and open-weight models on Direct Responses. Don’t rely on its absence. The summary comes back as a reasoning item in output[], before the message item:
A stream sends the reasoning item with OpenAI’s event names, in OpenAI’s order, before the message item opens (payloads trimmed):
Read the reasoning from response.reasoning_summary_text.delta (or the final text from .done) and the answer from response.output_text.delta, as with OpenAI. Every reasoning event carries the item’s item_id and output_index. A few details to handle:
  • Item status. A streamed reasoning item is in_progress when it opens and completed when it closes normally. It is incomplete when the stream reached the output limit or failed with the item still open, or when a retry took over (below).
  • Reasoning after text. Reasoning that arrives while answer text is streaming closes the open message item and opens its own reasoning item. The text that follows opens a new message item with a new id and only its own text.
  • Tool calls. A reasoning item closes before a tool call or image item opens.

Raw reasoning on Responses streams

Models outside the Anthropic, Google and OpenAI families, such as DeepSeek, GLM, gpt-oss, Qwen and Kimi, stream their raw reasoning rather than a summary, in OpenAI’s raw shape. The streamed reasoning item has an empty summary and the text in content: [{"type": "reasoning_text", "text": ...}], and the events are response.content_part.added, response.reasoning_text.delta…, response.reasoning_text.done and response.content_part.done (payloads trimmed):
On non-streamed responses these models return the reasoning in summary, like every other model. Handle both shapes if you stream from more than one family.

Examples by endpoint

Each example sets an effort and reads the reasoning and the answer. The OpenAI SDKs send reasoning_effort and reasoning natively. They don’t type reasoning_content, so read it with getattr in Python and a wider type in TypeScript. Parameters the SDKs don’t know, such as the grounding parameters, go in extra_body in Python and top-level with a cast in TypeScript. If your SDK version doesn’t type a level you send (such as max), pass it in extra_body as well.
For non-streamed and streamed examples on all six endpoints (Completions, Grounded Completions, Direct Completions, Responses, Grounded Responses and Direct Responses) in cURL, Python and TypeScript, see the Control reasoning effort tutorial. It also covers sizing the output limit and catching cut-off answers.

Completions

POST /ai/v2/guarded/chat/completions. The answer is moderated; the reasoning is not (see below).

How the endpoints differ

By model family

“Reported” means the level is listed in ignored_params. “Ceiling” is the model’s max_output_tokens in the catalog: thinking and answer together, and the most a limit you set can reach. See Set your output limit for reasoning models. Check the live model catalog for current model IDs and each model’s reasoning object and max_output_tokens; it is always current, while this table changes as models are added.

Reasoning is not moderated

On the guarded endpoints (Completions, Grounded Completions and Responses), output moderation checks the answer, not the reasoning. This holds for streamed and non-streamed responses. When moderation replaces an answer, the reasoning from the original answer is still returned.
If you show reasoning to your end users and rely on Gloo’s output moderation, check reasoning_content (or the Responses reasoning item and reasoning events) yourself first, or don’t show it.

Set your output limit for reasoning models

The rule: on a reasoning model, the output limit holds the thinking and the answer. That’s max_tokens on Chat Completions (max_completion_tokens is accepted too, and wins if you send both) and max_output_tokens on Responses. Reasoning tokens and answer tokens are both billed as output tokens, whether or not any reasoning comes back and whether or not you set an effort. OpenAI, Anthropic and Google count the limit the same way. The one exception is Grok: xAI applies the limit to the answer only, so the reasoning isn’t held to it, though reasoning tokens are still billed as output. So a limit sized for the answer alone, such as 500 or 1,024, can be used up by the thinking before the answer starts.

What Gloo sends

On Chat Completions, a model is reasoning when it reasons by default (unless none turns that off, as on GPT-5.5), when it is an OpenAI GPT-5 or later model or an open-weight reasoning model (whatever effort you set), or when you set a reasoning_effort other than none on a model that reasons only when asked. The exception is none with a limit on a model that can turn reasoning off (can_disable: true in the model catalog), from any provider: the model isn’t reasoning, so your limit is kept. Claude 5 models (including Haiku 5.5 and Fable) reason by default, so they are always reasoning on these endpoints: none can’t turn their reasoning off, so it doesn’t change the limit either. On Chat Completions, a limit of 0 or less counts as not set. none with no limit still gets the full output allowance: none keeps a limit only when you send one. Reasoning models get the raise whenever you set a limit below 8,192, even with no effort set, except with none on a model that can turn reasoning off (can_disable: true): there your limit is sent as you set it, up to the model’s maximum output, whichever provider the model comes from. On models that can’t turn reasoning off (can_disable: false), such as Claude 5 models, GPT-6 Astra, gpt-oss and GLM 5.3, a limit below 8,192 is still raised to 8,192 with none. A deprecated model ID that is served by its replacement gets the limit the replacement model would get; to see how such an ID reasons, read the catalog entry named in its replacement_model. The model catalog says which models reason by default (thinks_by_default), which can turn it off (can_disable), and each model’s maximum output (max_output_tokens). You’re billed only for the output tokens the model uses, not for the limit.

Size the limit

Start from the effort you set and the answer you expect, then adjust from the usage your requests report. These are not guarantees: the same model can reason much longer on a hard question than on an easy one. At low effort, reasoning almost always fits in 8,192 tokens with room for a short answer. With no effort set, size for the model’s default level, which is often medium or high.

Guarded and Grounded endpoints

  • Know the default. On Completions and Grounded Completions with no limit, a reasoning model gets its full output allowance (up to 65,536) and a model that isn’t reasoning gets 2,048, so set a limit for long answers. On Responses and Grounded Responses, see the table in What Gloo sends.
  • Set an effort to see the reasoning as it streams. With no effort set, reasoning isn’t shown while these endpoints stream; set any effort other than none to get it. See The settings.
  • Stream long requests. A non-streamed request that runs past Gloo’s response deadline fails with 3007 / GATEWAY_DEADLINE. Streaming avoids it.

Spot and fix a cut-off

A response that reached the limit says so:
  • Chat Completions: finish_reason: "length", streamed or not.
  • Responses: status: "incomplete" with incomplete_details: {"reason": "max_output_tokens"}. A non-streamed response can also carry a suggestion field that names the tokens used and the limit you sent.
With little or no answer text, the model spent the limit thinking. It’s not an outage, and resending the same request usually ends the same way. To fix it:
  1. Raise the limit, using the table above.
  2. Or lower the effort, so the model thinks less before it answers.
usage shows where the tokens went. Where the model reports it, usage.completion_tokens_details.reasoning_tokens (Chat Completions) or usage.output_tokens_details.reasoning_tokens (Responses) is the part of the output tokens that was reasoning. It isn’t reported everywhere: for Claude models it is 0 or missing on some endpoints, and their reasoning is still counted in the output tokens.

Best practices

  • Start generous, then tighten. Leave the limit unset on Chat Completions, or use the table above, look at usage across real requests, and lower the limit once you know how much your task needs. Don’t carry over limits from models that don’t reason.
  • Set the effort deliberately. Effort is the main control over how long the model thinks, and so over cost and time. To save tokens, lower the effort rather than the limit, which can cut the answer off.
  • Stream long generations. A large limit with a high effort can take minutes; streaming avoids 3007 / GATEWAY_DEADLINE and shows progress as it comes.
  • Size the limit per task, not once for your whole app: a classification and a long report need very different limits.
  • Check finish_reason or status before you use an answer, so a cut-off answer isn’t mistaken for a complete one.
  • Check the model’s ceiling. max_output_tokens in the model catalog is the most the model can produce, thinking and answer together. By model family notes models whose limits work differently.
For how output limits and reasoning effort fit with the rest of a request, see Pin a model and size the request, and for effort, limits, timeouts and cut-offs together, Reasoning Models in Production. A stream that stops at the output limit is covered in Handling Streaming Failures.

Cancelled and failed streams

If you cancel a Claude 5 stream, or it times out and no other provider takes over, while the model is still thinking, you’re billed for the thinking the model had already done, as on a stream that finishes. When the provider doesn’t report it, Gloo works it out from how long the model was generating, and never bills more than the request’s output limit. If another provider takes over the request, you’re billed once, for the attempt that served you.

When a provider fails mid-reasoning

If a provider fails while the model is still reasoning and before any answer, Gloo can retry the request on another provider. The model then reasons again from the start.
  • Chat streams have no item boundary, so the joined delta.reasoning_content holds both attempts’ reasoning, with no separator in the text. Completions and Grounded Completions streams mark the restart with one SSE comment line, : gloo-attempt-restart, which SSE clients ignore. Direct Completions streams may or may not carry that line.
  • Responses streams close the first reasoning item with status: "incomplete" and exactly the text it streamed. The retry’s reasoning opens a new reasoning item, with its own id, at the next output_index.

Reasoning across turns

Reasoning items never include encrypted_content, and include: ["reasoning.encrypted_content"] returns none. Reasoning items you send back in input are not used as reasoning state: any encrypted reasoning in them is removed before a model is called, and the request still succeeds. The removal is reported:
  • Responses and Grounded Responses add a reasoning_carryover field, for example {"received": 2, "carried": 0, "dropped": [{"id": "rs_1", "reason": "not_gloo_state"}], "not_sealed": null}. On a stream, the counts are in the X-Gloo-Reasoning-Carryover header and the final field is in response.completed.
  • Direct Responses reports it as input.reasoning=<n> in ignored_params.
  • Direct Completions returns reasoning only as reasoning_content, with no thinking blocks or signatures. thinking and redacted_thinking parts you send back to a Claude model in an assistant message’s content are removed and reported as messages.thinking=<n> in ignored_params (on a stream, as messages.thinking in the X-Ignored-Params header). Completions and Grounded Completions refuse those parts with a 422, so send assistant content as text there.
Other items tied to removed reasoning, such as a hosted tool call from the same turn, can be removed with it (paired_removed in reasoning_carryover, input.reasoning_paired=<n> in ignored_params). Send the full conversation in input each turn; the model reasons afresh.

supports_reasoning and reasoning_level

On GET /platform/v2/models, supports_reasoning is true exactly when reasoning is not null. It does not promise that reasoning text comes back; reasoning.returns_summary says that. reasoning_level is an overall quality rating from 0 to 5, not a measure of reasoning: a model that does not reason can score 4.

Next steps

For which endpoints run guardrails and moderation, see Endpoint Types.

Supported Models

Model IDs and the reasoning object.

Thinking on Anthropic Messages

Anthropic’s thinking and output_config.effort parameters, for the Anthropic SDKs.

Provider Failover

What happens when a provider fails, including reasoning and the output limit.

Before you ship

Which errors to retry, and how to back off.