Reasoning effort
One provider-neutral setting, reasoning: { level, strict? }, controls how hard a model thinks on every ModelRig call, on both lanes (rig.runRaw / runRawStream and rig.run). You can set it in code, on a step or route without code, or as an organization default. Every call records the level it asked for, what was sent to the provider, and the reasoning tokens it cost.
Sincemodelrig0.19.0: thenoneandmaxlevels,strict, the step / route / org layers, the routed-lanereasoningoption and the recordedreasoning_*fields. The CE-2 levels (minimal | low | medium | high) onrig.runRaware on npm since 0.4.0.
Levels
none | minimal | low | medium | high | max, in that order.
none: reasoning off, where the model can turn it off.minimal,low,medium,high: mean what they always meant.max: the model's top effort. That is OpenAImax(orxhighwheremaxis not offered), Anthropicmax, Grokxhigh, or the largest thinking budget.
Where the level comes from
The most specific setting wins:
1. The call: rig.runRaw({ …, reasoning: { level: "high" } }) or rig.run(route, { …, reasoning: { level: "high" } }). 2. The step or route. On the raw lane, a step pin's reasoning: { level, strict? } applies (Routes & steps in the console, or set_call_config over MCP). On the routed lane, the route's call-config reasoning applies, then the route YAML's policy.reasoning. 3. The org's per-model default, reasoning_defaults.models["<provider>/<model>"]. 4. The org default, reasoning_defaults.default. 5. Nothing. No reasoning field is sent and the provider's default applies. The request and the recorded row are byte-identical to an SDK without this feature.
A step pin that moves a call to another model looks up the org's per-model default for the new model. Org defaults ride the org-settings read the SDK already does for the provider policy. If that read fails, the SDK keeps the last value it read and never blocks a call.
# route YAML: the keys are closed, and a typo is a load error
policy:
timeout_ms: 300000
reasoning: { level: medium } # strict defaults to false here
// GET / PATCH /v1/orgs/:org/settings (owner only)
"reasoning_defaults": {
"default": "medium",
"models": { "openai/gpt-6-sol": "high", "deepseek/deepseek-flash": "none" }
}
When a model cannot apply the level
The provider table below lists the levels each model accepts.
- The model accepts the level: it is sent as is.
- The model does not accept the level: the nearest level it does accept is sent. On a tie the higher level wins, so quality is never cut silently. The row records
reasoning_substituted: trueand the reason. noneon a model that cannot turn reasoning off: its lowest level is sent.- The model has no reasoning control: nothing is sent, and the row records
reasoning_applied: "ignored". - **A configured level (step, route or org) on a model the table does not verify:** nothing is sent, and the row records `reasoning_note: unverified_model`. This covers a fallback row or a row marked unverified, so an org default can never turn a working call into a provider error. A per-call level still uses the provider's documented fallback ladder.
strict: true turns every substitution and every ignore into a pre-dispatch invariant_violation with a fix hint. Nothing is sent and nothing is billed.
| Where the level was set | strict when omitted |
|---|---|
Per call (rig.runRaw, rig.run) | true: fail closed, the CE-2 behaviour |
| Step, route, org default | false: degrade and record |
Pass strict: false on a call to opt into degrading. If a step pin moves a call to another model, a per-call level that omits strict degrades instead of failing, because the pin's owner chose the new model.
Anthropic. With thinking on, Anthropic rejects temperature and top_p, so those are not sent. The row records reasoning_note: sampling_dropped.
A manual budget_tokens must stay below max_tokens. When it would not, max_tokens is raised to the budget plus your output cap, and the row records max_tokens_raised. The routed lane's spend estimate uses the raised value.
Claude cannot think through a forced tool call, which includes structured output and a required or named tool choice. On those calls thinking is withheld, and the row records forced_tool_thinking_off; a strict level is refused instead.
The same applies over a tool-call history: messages with an assistant tool call or a tool result. The earlier tool turns carry no thinking blocks, so thinking is withheld and the row records tool_history_thinking_off; a strict level is refused instead.
What is recorded
Every attempt whose call resolved a level carries these keys on inferences.meta:
| Key | Value |
|---|---|
reasoning_requested | the resolved level |
reasoning_source | call, step, route, org_model or org |
reasoning_applied | what was sent: reasoning_effort=high, thinkingLevel=low, thinkingBudget=8192, budget_tokens=16384, effort=max, thinking=disabled, reasoning.effort=medium, or ignored |
reasoning_substituted | true when what was sent differs from what was asked |
reasoning_note | why, as codes joined by +: nearest_supported_level, cannot_disable_lowest_level, no_reasoning_control, unverified_model, max_tokens_raised, sampling_dropped, forced_tool_thinking_off, tool_history_thinking_off |
reasoning_tokens | reasoning or thinking tokens the provider reported |
If no level was configured anywhere, none of the reasoning_* keys appear. The returned result carries the same information:
RunMeta.reasoning(typeRunReasoningMeta) is{ requested, source, applied, substituted, note? }, and is present only when a level was resolved.noteis written in words.RunMeta.reasoningTokensis present whenever the provider reported a count, whether or not a level was configured.
rig.recordCall({ …, reasoning: { level, applied?, source?, substituted? } }) records the same keys for a call your own code made.
Pricing. Reasoning and thinking tokens are billed as output, and tokensOut is what the provider bills as output. The rule is the same whether or not a level was set.
| Provider | What tokensOut counts | Source |
|---|---|---|
| OpenAI, Azure, DeepSeek | completion_tokens as reported; the reasoning count is a subset of it | |
| Anthropic | output_tokens as reported, which includes thinking; reasoning_tokens comes from usage.output_tokens_details.thinking_tokens on the final message_delta | platform.claude.com extended-thinking, read 2026-11-26 |
| Gemini | candidatesTokenCount + thoughtsTokenCount | |
| xAI (Grok) | completion_tokens + reasoning_tokens: xAI reports reasoning outside completion_tokens and bills it at the completion rate | docs.x.ai, read 2026-11-26 |
| OpenAI-compatible hosts (DeepInfra, Fireworks, Z.ai, OpenRouter, AssemblyAI) | completion_tokens as reported, unchanged (their semantics are not verified) |
Bedrock rows carry no reasoning_tokens: the Converse field is not verified.
Provider mapping
The table below is generated from the matrix the adapters read (REASONING_MATRIX, through mapReasoning), so it cannot drift from what is sent. In the level column, italic is the level that level is degraded to when strict: false. A row marked unverified is the conservative mapping for a case the vendor docs did not settle.
| Provider | Models | Native control | Level → native value (italic = degraded to) | Status | |
|---|---|---|---|---|---|
gemini | gemini-3-pro | thinkingLevel | none→low · minimal→low · low→low · medium→high · high→high · max→high | verified | |
gemini | gemini-3.1-pro | thinkingLevel | none→low · minimal→low · low→low · medium→medium · high→high · max→high | verified | |
gemini | gemini-3.7-flash, gemini-3.8-flash | thinkingLevel | none→low · minimal→low · low→low · medium→medium · high→high · max→high | verified | |
gemini | gemini-3.x-flash, -flash-lite (3, 3.1, 3.5, 3.6) | thinkingLevel | none→minimal · minimal→minimal · low→low · medium→medium · high→high · max→high | verified | |
gemini | gemini-4 hydrogen | thinkingLevel | none→low · minimal→low · low→low · medium→medium · high→high · max→xhigh | verified | |
gemini | gemini-4* | thinkingLevel | none→low · minimal→low · low→low · medium→medium · high→high · max→high | verified | |
gemini | gemini-2.5-pro | thinkingBudget | none→minimal · minimal→128 · low→1024 · medium→8192 · high→16384 · max→32768 | verified — budget 128–32768; cannot turn off | |
gemini | gemini-2.5-flash, -flash-lite | thinkingBudget | none→0 · minimal→512 · low→1024 · medium→8192 · high→16384 · max→24576 | verified — budget ≤ 24576; 0 = off | |
gemini | gemini-1.x, gemini-2.0* | — | ignored | verified | |
gemini | any other model | — | ignored | unverified — unknown model ⇒ ignored (fail-closed when strict) | |
openai | gpt-6.1-sol | reasoning_effort | none→low · minimal→low · low→low · medium→medium · high→high · max→max | verified — rejects none and minimal | |
openai | gpt-6-astra, gpt-6.x-astra, gpt-6.2-* | reasoning_effort | none→low · minimal→low · low→low · medium→medium · high→high · max→max | verified — rejects none | |
openai | gpt-6* (sol, luna) | reasoning_effort | none→none · minimal→low · low→low · medium→medium · high→high · max→max | verified | |
openai | gpt-5.6* | reasoning_effort | none→none · minimal→low · low→low · medium→medium · high→high · max→max | verified | |
openai | gpt-5-pro | reasoning_effort | none→high · minimal→high · low→high · medium→high · high→high · max→high | verified — high only | |
openai | gpt-5.x-chat, gpt-5-chat, gpt-5-search-api | — | ignored | unverified — chat / search snapshots take no effort (conservative) | |
openai | gpt-5.2 – gpt-5.5 | reasoning_effort | none→none · minimal→low · low→low · medium→medium · high→high · max→xhigh | verified — max → xhigh (Azure's table omits xhigh on 5.2) | |
openai | gpt-5.1-codex-max | reasoning_effort | none→low · minimal→low · low→low · medium→medium · high→high · max→xhigh | unverified | |
openai | gpt-5.1* | reasoning_effort | none→none · minimal→low · low→low · medium→medium · high→high · max→high | verified | |
openai | gpt-5, gpt-5-mini, gpt-5-nano, gpt-5-codex | reasoning_effort | none→minimal · minimal→minimal · low→low · medium→medium · high→high · max→high | verified — the only family with minimal | |
openai | o1-mini | — | ignored | verified | |
openai | o-series (o1, o3, o4-mini) | reasoning_effort | none→low · minimal→low · low→low · medium→medium · high→high · max→high | unverified | |
openai | gpt-4, gpt-3.5, chatgpt-* | — | ignored | unverified — non-reasoning models | |
openai | any other model | reasoning_effort | none→minimal · minimal→minimal · low→low · medium→medium · high→high · max→high | unverified — the CE-2 four forwarded 1:1; the provider enforces | |
deepseek | deepseek-v4-pro, deepseek-flash (deepseek-v4-*) | reasoning_effort | none→none · minimal→low · low→low · medium→high · high→high · max→max | verified | |
deepseek | deepseek-chat, deepseek-reasoner (legacy) | — | ignored | unverified — legacy ids: reasoning is model selection | |
deepseek | any other model | reasoning_effort | none→none · minimal→low · low→low · medium→high · high→high · max→max | unverified | |
anthropic | fable-, mythos- | effort | none→low · minimal→low · low→low · medium→medium · high→high · max→max | verified — adaptive; thinking cannot be turned off | |
anthropic | claude-opus-5.5, claude-sonnet-5.5 | effort | none→low · minimal→low · low→low · medium→medium · high→high · max→max | verified — adaptive; disabled is rejected | |
anthropic | claude 5.x (opus-5, sonnet-5, haiku-5.5) | effort | none→disabled · minimal→low · low→low · medium→medium · high→high · max→max | verified — adaptive; none ⇒ thinking disabled | |
anthropic | claude 4.6 – 4.8 | effort | none→disabled · minimal→low · low→low · medium→medium · high→high · max→max | verified — adaptive (4.6 also takes the deprecated manual form) | |
anthropic | claude-opus-4, claude-opus-4.1 | budget_tokens | none→disabled · minimal→1024 · low→2048 · medium→4096 · high→8192 · max→16000 | verified — manual budget (32K output) | |
anthropic | claude 3.7 – 4.5 | budget_tokens | none→disabled · minimal→1024 · low→4096 · medium→8192 · high→16384 · max→32000 | verified — manual budget; budget < max_tokens | |
anthropic | claude 3.5 and older | — | ignored | verified | |
anthropic | any other Claude model | effort | none→low · minimal→low · low→low · medium→medium · high→high · max→max | unverified — assumed adaptive; off not assumed | |
grok | grok-4.20-multi-agent | — | ignored | verified — effort sets the agent count there, not depth — never sent | |
grok | grok-*-non-reasoning | — | ignored | unverified | |
grok | grok-4.6, grok-4.7 | reasoning_effort | none→low · minimal→low · low→low · medium→medium · high→high · max→xhigh | verified | |
grok | grok-4.5 | reasoning_effort | none→low · minimal→low · low→low · medium→medium · high→high · max→high | verified | |
grok | grok-3-mini | reasoning_effort | none→low · minimal→low · low→low · medium→high · high→high · max→high | unverified — CE-9 low | high |
grok | grok-4, grok-4.1, grok-4-fast, grok-3, grok-2 | — | ignored | unverified — reasoning-only / no effort parameter | |
grok | any other model | reasoning_effort | none→low · minimal→low · low→low · medium→medium · high→high · max→high | unverified | |
deepinfra | every model | reasoning_effort | none→minimal · minimal→minimal · low→low · medium→medium · high→high · max→high | unverified — undocumented — the CE-2 four forwarded 1:1 | |
fireworks | every model | reasoning_effort | none→low · minimal→low · low→low · medium→medium · high→high · max→high | verified — control verified; per-model support is not — configured levels are not sent | |
zai | glm-5.3* | thinking | none→high · minimal→high · low→high · medium→high · high→enabled · max→high | verified — thinking is always on | |
zai | glm-4.5 – glm-5.x | thinking | none→disabled · minimal→none · low→high · medium→high · high→enabled · max→high | verified — on/off only | |
zai | any other model | thinking | none→disabled · minimal→none · low→high · medium→high · high→enabled · max→high | unverified — on/off only | |
bedrock | Claude models → the anthropic rows; non-Claude models | — | ignored | unverified | |
azure-openai | gpt-6.1-sol | reasoning_effort | none→low · minimal→low · low→low · medium→medium · high→high · max→xhigh | verified — rejects none and minimal | |
azure-openai | gpt-6-astra, gpt-6.x-astra, gpt-6.2-* | reasoning_effort | none→low · minimal→low · low→low · medium→medium · high→high · max→xhigh | verified — rejects none | |
azure-openai | gpt-6* (sol, luna) | reasoning_effort | none→none · minimal→low · low→low · medium→medium · high→high · max→xhigh | verified | |
azure-openai | gpt-5.6* | reasoning_effort | none→none · minimal→low · low→low · medium→medium · high→high · max→xhigh | verified | |
azure-openai | gpt-5-pro | reasoning_effort | none→high · minimal→high · low→high · medium→high · high→high · max→high | verified — high only | |
azure-openai | gpt-5.x-chat, gpt-5-chat, gpt-5-search-api | — | ignored | unverified — chat / search snapshots take no effort (conservative) | |
azure-openai | gpt-5.2 – gpt-5.5 | reasoning_effort | none→none · minimal→low · low→low · medium→medium · high→high · max→xhigh | verified — max → xhigh (Azure's table omits xhigh on 5.2) | |
azure-openai | gpt-5.1-codex-max | reasoning_effort | none→low · minimal→low · low→low · medium→medium · high→high · max→xhigh | unverified | |
azure-openai | gpt-5.1* | reasoning_effort | none→none · minimal→low · low→low · medium→medium · high→high · max→high | verified | |
azure-openai | gpt-5, gpt-5-mini, gpt-5-nano, gpt-5-codex | reasoning_effort | none→minimal · minimal→minimal · low→low · medium→medium · high→high · max→high | verified — the only family with minimal | |
azure-openai | o1-mini | — | ignored | verified | |
azure-openai | o-series (o1, o3, o4-mini) | reasoning_effort | none→low · minimal→low · low→low · medium→medium · high→high · max→high | unverified | |
azure-openai | gpt-4, gpt-3.5, chatgpt-* | — | ignored | unverified — non-reasoning models | |
azure-openai | any other model | reasoning_effort | none→minimal · minimal→minimal · low→low · medium→medium · high→high · max→high | unverified — the CE-2 four forwarded 1:1; the provider enforces | |
vertex | Claude models → the anthropic rows; Gemini models → the gemini rows; non-Claude, non-Gemini models | — | ignored | unverified | |
openrouter | every model | reasoning.effort | none→none · minimal→minimal · low→low · medium→medium · high→high · max→max | verified — OpenRouter maps effort per upstream (control verified; per-model support is not — configured levels are not sent) | |
assemblyai | every model | — | ignored | unverified — the gateway documents no reasoning control |
Sources:
gemini: https://docs.cloud.google.com/vertex-ai/generative-ai/docs/thinking (read 2026-11-26)openai: https://developers.openai.com/api/docs/guides/reasoning (read 2026-11-26)deepseek: https://api-docs.deepseek.com/guides/thinking_mode (read 2026-11-26)anthropic: https://platform.claude.com/docs/en/build-with-claude/extended-thinking (read 2026-11-26)grok: https://docs.x.ai/docs/guides/reasoning (read 2026-11-26)fireworks: https://docs.fireworks.ai/guides/reasoning (read 2026-11-26)zai: https://docs.z.ai/guides/capabilities/thinking-mode (read 2026-11-26)bedrock: https://docs.aws.amazon.com/bedrock/latest/userguide/claude-messages-adaptive-thinking.html (read 2026-11-26)azure-openai: https://learn.microsoft.com/en-us/azure/ai-foundry/openai/how-to/reasoning (read 2026-11-26)vertex: https://docs.cloud.google.com/vertex-ai/generative-ai/docs/thinking (read 2026-11-26)openrouter: https://openrouter.ai/docs/use-cases/reasoning-tokens (read 2026-11-26)
To check a mapping without making a call, use mapReasoning(provider, model, level). It returns the native value, the level applied, and whether it was substituted or ignored.