ModelRig Docs Leaderboard Console ↗ Sign up

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.

Since modelrig 0.19.0: the none and max levels, strict, the step / route / org layers, the routed-lane reasoning option and the recorded reasoning_* fields. The CE-2 levels (minimal | low | medium | high) on rig.runRaw are on npm since 0.4.0.

Levels

none | minimal | low | medium | high | max, in that order.

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.

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 setstrict when omitted
Per call (rig.runRaw, rig.run)true: fail closed, the CE-2 behaviour
Step, route, org defaultfalse: 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:

KeyValue
reasoning_requestedthe resolved level
reasoning_sourcecall, step, route, org_model or org
reasoning_appliedwhat was sent: reasoning_effort=high, thinkingLevel=low, thinkingBudget=8192, budget_tokens=16384, effort=max, thinking=disabled, reasoning.effort=medium, or ignored
reasoning_substitutedtrue when what was sent differs from what was asked
reasoning_notewhy, 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_tokensreasoning 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:

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.

ProviderWhat tokensOut countsSource
OpenAI, Azure, DeepSeekcompletion_tokens as reported; the reasoning count is a subset of it
Anthropicoutput_tokens as reported, which includes thinking; reasoning_tokens comes from usage.output_tokens_details.thinking_tokens on the final message_deltaplatform.claude.com extended-thinking, read 2026-11-26
GeminicandidatesTokenCount + thoughtsTokenCount
xAI (Grok)completion_tokens + reasoning_tokens: xAI reports reasoning outside completion_tokens and bills it at the completion ratedocs.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.

ProviderModelsNative controlLevel → native value (italic = degraded to)Status
geminigemini-3-prothinkingLevelnone→low · minimal→low · low→low · medium→high · high→high · max→highverified
geminigemini-3.1-prothinkingLevelnone→low · minimal→low · low→low · medium→medium · high→high · max→highverified
geminigemini-3.7-flash, gemini-3.8-flashthinkingLevelnone→low · minimal→low · low→low · medium→medium · high→high · max→highverified
geminigemini-3.x-flash, -flash-lite (3, 3.1, 3.5, 3.6)thinkingLevelnone→minimal · minimal→minimal · low→low · medium→medium · high→high · max→highverified
geminigemini-4 hydrogenthinkingLevelnone→low · minimal→low · low→low · medium→medium · high→high · max→xhighverified
geminigemini-4*thinkingLevelnone→low · minimal→low · low→low · medium→medium · high→high · max→highverified
geminigemini-2.5-prothinkingBudgetnone→minimal · minimal→128 · low→1024 · medium→8192 · high→16384 · max→32768verified — budget 128–32768; cannot turn off
geminigemini-2.5-flash, -flash-litethinkingBudgetnone→0 · minimal→512 · low→1024 · medium→8192 · high→16384 · max→24576verified — budget ≤ 24576; 0 = off
geminigemini-1.x, gemini-2.0*—ignoredverified
geminiany other model—ignoredunverified — unknown model ⇒ ignored (fail-closed when strict)
openaigpt-6.1-solreasoning_effortnone→low · minimal→low · low→low · medium→medium · high→high · max→maxverified — rejects none and minimal
openaigpt-6-astra, gpt-6.x-astra, gpt-6.2-*reasoning_effortnone→low · minimal→low · low→low · medium→medium · high→high · max→maxverified — rejects none
openaigpt-6* (sol, luna)reasoning_effortnone→none · minimal→low · low→low · medium→medium · high→high · max→maxverified
openaigpt-5.6*reasoning_effortnone→none · minimal→low · low→low · medium→medium · high→high · max→maxverified
openaigpt-5-proreasoning_effortnone→high · minimal→high · low→high · medium→high · high→high · max→highverified — high only
openaigpt-5.x-chat, gpt-5-chat, gpt-5-search-api—ignoredunverified — chat / search snapshots take no effort (conservative)
openaigpt-5.2 – gpt-5.5reasoning_effortnone→none · minimal→low · low→low · medium→medium · high→high · max→xhighverified — max → xhigh (Azure's table omits xhigh on 5.2)
openaigpt-5.1-codex-maxreasoning_effortnone→low · minimal→low · low→low · medium→medium · high→high · max→xhighunverified
openaigpt-5.1*reasoning_effortnone→none · minimal→low · low→low · medium→medium · high→high · max→highverified
openaigpt-5, gpt-5-mini, gpt-5-nano, gpt-5-codexreasoning_effortnone→minimal · minimal→minimal · low→low · medium→medium · high→high · max→highverified — the only family with minimal
openaio1-mini—ignoredverified
openaio-series (o1, o3, o4-mini)reasoning_effortnone→low · minimal→low · low→low · medium→medium · high→high · max→highunverified
openaigpt-4, gpt-3.5, chatgpt-*—ignoredunverified — non-reasoning models
openaiany other modelreasoning_effortnone→minimal · minimal→minimal · low→low · medium→medium · high→high · max→highunverified — the CE-2 four forwarded 1:1; the provider enforces
deepseekdeepseek-v4-pro, deepseek-flash (deepseek-v4-*)reasoning_effortnone→none · minimal→low · low→low · medium→high · high→high · max→maxverified
deepseekdeepseek-chat, deepseek-reasoner (legacy)—ignoredunverified — legacy ids: reasoning is model selection
deepseekany other modelreasoning_effortnone→none · minimal→low · low→low · medium→high · high→high · max→maxunverified
anthropicfable-, mythos-effortnone→low · minimal→low · low→low · medium→medium · high→high · max→maxverified — adaptive; thinking cannot be turned off
anthropicclaude-opus-5.5, claude-sonnet-5.5effortnone→low · minimal→low · low→low · medium→medium · high→high · max→maxverified — adaptive; disabled is rejected
anthropicclaude 5.x (opus-5, sonnet-5, haiku-5.5)effortnone→disabled · minimal→low · low→low · medium→medium · high→high · max→maxverified — adaptive; none ⇒ thinking disabled
anthropicclaude 4.6 – 4.8effortnone→disabled · minimal→low · low→low · medium→medium · high→high · max→maxverified — adaptive (4.6 also takes the deprecated manual form)
anthropicclaude-opus-4, claude-opus-4.1budget_tokensnone→disabled · minimal→1024 · low→2048 · medium→4096 · high→8192 · max→16000verified — manual budget (32K output)
anthropicclaude 3.7 – 4.5budget_tokensnone→disabled · minimal→1024 · low→4096 · medium→8192 · high→16384 · max→32000verified — manual budget; budget < max_tokens
anthropicclaude 3.5 and older—ignoredverified
anthropicany other Claude modeleffortnone→low · minimal→low · low→low · medium→medium · high→high · max→maxunverified — assumed adaptive; off not assumed
grokgrok-4.20-multi-agent—ignoredverified — effort sets the agent count there, not depth — never sent
grokgrok-*-non-reasoning—ignoredunverified
grokgrok-4.6, grok-4.7reasoning_effortnone→low · minimal→low · low→low · medium→medium · high→high · max→xhighverified
grokgrok-4.5reasoning_effortnone→low · minimal→low · low→low · medium→medium · high→high · max→highverified
grokgrok-3-minireasoning_effortnone→low · minimal→low · low→low · medium→high · high→high · max→highunverified — CE-9 lowhigh
grokgrok-4, grok-4.1, grok-4-fast, grok-3, grok-2—ignoredunverified — reasoning-only / no effort parameter
grokany other modelreasoning_effortnone→low · minimal→low · low→low · medium→medium · high→high · max→highunverified
deepinfraevery modelreasoning_effortnone→minimal · minimal→minimal · low→low · medium→medium · high→high · max→highunverified — undocumented — the CE-2 four forwarded 1:1
fireworksevery modelreasoning_effortnone→low · minimal→low · low→low · medium→medium · high→high · max→highverified — control verified; per-model support is not — configured levels are not sent
zaiglm-5.3*thinkingnone→high · minimal→high · low→high · medium→high · high→enabled · max→highverified — thinking is always on
zaiglm-4.5 – glm-5.xthinkingnone→disabled · minimal→none · low→high · medium→high · high→enabled · max→highverified — on/off only
zaiany other modelthinkingnone→disabled · minimal→none · low→high · medium→high · high→enabled · max→highunverified — on/off only
bedrockClaude models → the anthropic rows; non-Claude models—ignoredunverified
azure-openaigpt-6.1-solreasoning_effortnone→low · minimal→low · low→low · medium→medium · high→high · max→xhighverified — rejects none and minimal
azure-openaigpt-6-astra, gpt-6.x-astra, gpt-6.2-*reasoning_effortnone→low · minimal→low · low→low · medium→medium · high→high · max→xhighverified — rejects none
azure-openaigpt-6* (sol, luna)reasoning_effortnone→none · minimal→low · low→low · medium→medium · high→high · max→xhighverified
azure-openaigpt-5.6*reasoning_effortnone→none · minimal→low · low→low · medium→medium · high→high · max→xhighverified
azure-openaigpt-5-proreasoning_effortnone→high · minimal→high · low→high · medium→high · high→high · max→highverified — high only
azure-openaigpt-5.x-chat, gpt-5-chat, gpt-5-search-api—ignoredunverified — chat / search snapshots take no effort (conservative)
azure-openaigpt-5.2 – gpt-5.5reasoning_effortnone→none · minimal→low · low→low · medium→medium · high→high · max→xhighverified — max → xhigh (Azure's table omits xhigh on 5.2)
azure-openaigpt-5.1-codex-maxreasoning_effortnone→low · minimal→low · low→low · medium→medium · high→high · max→xhighunverified
azure-openaigpt-5.1*reasoning_effortnone→none · minimal→low · low→low · medium→medium · high→high · max→highverified
azure-openaigpt-5, gpt-5-mini, gpt-5-nano, gpt-5-codexreasoning_effortnone→minimal · minimal→minimal · low→low · medium→medium · high→high · max→highverified — the only family with minimal
azure-openaio1-mini—ignoredverified
azure-openaio-series (o1, o3, o4-mini)reasoning_effortnone→low · minimal→low · low→low · medium→medium · high→high · max→highunverified
azure-openaigpt-4, gpt-3.5, chatgpt-*—ignoredunverified — non-reasoning models
azure-openaiany other modelreasoning_effortnone→minimal · minimal→minimal · low→low · medium→medium · high→high · max→highunverified — the CE-2 four forwarded 1:1; the provider enforces
vertexClaude models → the anthropic rows; Gemini models → the gemini rows; non-Claude, non-Gemini models—ignoredunverified
openrouterevery modelreasoning.effortnone→none · minimal→minimal · low→low · medium→medium · high→high · max→maxverified — OpenRouter maps effort per upstream (control verified; per-model support is not — configured levels are not sent)
assemblyaievery model—ignoredunverified — the gateway documents no reasoning control

Sources:

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.