Expand description
How much a model thinks, and where the number goes.
Two halves, and the split is the point. What the user asks for is one ladder, shared by every
backend: none < minimal < low < medium < high < xhigh < max. What a backend accepts is not
knowable from here — llama.cpp takes a graded reasoning_effort on some models and ignores it on
others, a bool-valued chat-template kwarg is the only switch on a third, and an endpoint may
reject a level with a 400 — so it is declared, per provider profile and per model, in an
editable manifest (see the [[provider_profile.reasoning]] table). This module holds the math
and the manifest shape; the manifests hold the knowledge.
The clamping rule is borrowed from Hermes’ agent/reasoning_effort.clamp_effort, and the
per-model mapping shape from Pi’s thinkingLevelMap — both are the same idea: a requested level
resolves to a level this wire has, never upward, and a level that maps to nothing is omitted
rather than guessed.
Structs§
- Dial
- The effort a request carries, read per request.
- InForce
- The effort in force, in the forms each surface needs (
#264). - Policy
- One backend’s reasoning policy, as a manifest declares it.
Enums§
- Kind
- What a backend’s reasoning field takes.
- OffSwitch
- How a backend turns thinking off, which is not the same anywhere.
- Omitted
- Why nothing is being sent — the sentence
/reasoningprints instead of pretending. - Wire
- What one request should carry, and what can be said about it.
Constants§
- LADDER
- The ladder, weakest first. A request is clamped down it and never up: a level a backend does not have must not quietly cost more than the one that was asked for.
- NOT_
SENT - What the read-out says when the next request carries no reasoning field at all.
- OMIT
- The word that says “put no reasoning field on the wire at all”.
- SHIPPED_
DEFAULT - The level an install reasons at when nobody said otherwise: the
defaultboth shipped profiles declare, and the lineconfig initwrites live intoconfig.toml.
Functions§
- field_
path {"a.b": v}as a nested object:{"a": {"b": v}}. Public because a profile names the path for anything it places (the reasoning field,num_ctx) and there should be one spelling of that.- is_
level - The levels a
/reasoningargument may name.noneis here because it is also the off switch on every backend measured so far; a manifest that has no disable maps it to nothing instead. - is_omit
- Whether this word is the “send no field” sentinel rather than a level.
- looks_
like_ ollama - Is this base URL Ollama itself rather than something that merely speaks its wire?
- report_
for - The whole report for a dial and the route behind it: the one construction every front uses.
- sentence
- One sentence for a level, given the control a route resolved to. The single wording for
/reasoning, the launch panel and the readout, so a clamp is described the same way wherever it is reported.
Type Aliases§
- Shared
- A dial every route of one session shares.