Reasoning is managed via a provider-neutral ReasoningPolicy defined in core/reasoning.py. This policy consists of three components:
control: The state of reasoning (provider default, explicitly off, or explicitly on).effort: The client's requested effort level.budget_tokens: An exact positive integer budget if supplied.
The FCC Numeric Scale:
When a provider requires a named effort but the client provides a numeric budget, FCC maps the budget to its internal scale:
minimal / low: 512 tokensmedium: 1024 tokenshigh: 2048 tokensxhigh: 4096 tokensmax: 8192 tokens
Rules for Implementation:
- No Model-Name Inspection: Never inspect upstream model names to decide reasoning behavior; use the policy.
- Single Encoder: Each provider profile must have exactly one reasoning encoder responsible for writing the provider's specific computation and reasoning-output fields.
- Precedence: Exact client budgets take precedence over named effort scales.
- Reasoning Replay: Replaying reasoning history is a separate decision from the computation control. Profiles must explicitly choose how to handle prior state (e.g.,
<think> tags, native reasoning_content, or no replay).