Skip to main content

Module fleet_reasoning

Module fleet_reasoning 

Source
Expand description

The one requested → effective reasoning resolver, with provider capability normalization, preserved provenance, and durable receipts that carry disclosure without content.

Models never auto-switch inside the exact Fleet experience. A worker’s provider/model is frozen and preflighted before this module runs; everything here only decides how hard that already-chosen model thinks.

Resolution order for an exact member:

  1. A concrete requested tier resolves to itself, normalized against the route’s real capability. No Router is called — a manually pinned tier costs nothing.
  2. reasoning = "auto" always goes to the Fleet’s attached Reasoning Router (see crate::reasoning_router). There is no provider-native-adaptive bypass: a route that chooses its own depth is a fact about how the request is shaped, not a reason to skip the service the operator configured. A missing or unready Router is an error before work starts, and exact Fleets never fall back to the local keyword heuristic or to legacy model routing.

Legacy (non-exact) callers keep the old behavior through resolve_legacy_reasoning, which is allowed to use a local heuristic.

§What a durable receipt may hold

A receipt is written to journals and events that travel further than the machine that produced them, so it holds no task text and no routing summary text — only bounded counts, a truncation flag, a stable hash of the exact transmitted bytes, what redaction removed, and whether the inference crossed provider boundaries. Everything else on it is an id, a model string, a tier label, or a boolean.

Structs§

FleetTaskReceipt
The durable, visible receipt for one exact-Fleet task launch.
ReasoningCapability
What a provider/model route can truthfully do with reasoning.
ResolvedReasoning
A resolved reasoning decision that keeps every side of the story: what the member asked for, which tier the selector landed on, what the provider is actually able to be told, and where the decision came from.
RouterCallDisclosure
Everything a receipt needs to say about the Router’s own call.
RouterCallInput
The only thing a Reasoning Router is asked. Provider/model are inputs, not questions: they are already frozen and are shown to the router purely as context for how hard to think.
RouterCallPlan
The tier a Router call is actually made at, plus the disclosure for it.
RouterDecision
A Reasoning Router’s entire output. One job, one field.
RouterIdentity
The exact identity of the Reasoning Router service that decided a tier.
RoutingDisclosure
Everything a durable record may say about what was sent to a Router.
RoutingPayload
The bounded payload actually handed to a Router, plus its disclosure.

Enums§

EffectiveReasoning
The reasoning a request actually runs with.
EffectiveReasoningSource
Where the effective reasoning came from. Provenance is preserved alongside the request so a receipt can show both.
ProviderEffectiveReasoning
What the provider actually ends up being asked for, as distinct from the tier the selector picked.
ProviderReasoningControl
How much reasoning control a provider/model route actually expresses on the wire.
ReasoningResolveError
RouterAvailability
Whether an exact Fleet actually has a Router it can call right now.
RouterDecisionError
TaskShape
A coarse, host-derived shape label for a task.

Constants§

FAITHFUL_WIRE_TIERS
The identity map: every requested tier reaches the wire unchanged.
ROUTER_CALL_REASONING
The cheapest reasoning a Router call falls back to when nothing else is configured. A Router profile may raise this to low — and no further.
ROUTER_MAX_OUTPUT_TOKENS
Output-token ceiling for a Router call. The Router answers with one small JSON object; nothing it could legitimately say needs more room, and a tight bound is what keeps a per-task Router call cheap.
ROUTER_REASONING_FIELD
The one and only key a Reasoning Router may emit.
ROUTER_SUMMARY_MAX_CHARS
Character ceiling on the task text handed to a Router.
ROUTING_SCOPE
Scope label recorded on a disclosure: what class of content was sent.

Functions§

bounded_routing_payload
Bound, sanitize, and redact task text into the payload a Router receives.
parse_router_decision
Parse a router response, rejecting anything that is not purely a reasoning decision for the already frozen route.
resolve_exact_member_reasoning
Resolve reasoning for one exact Fleet member against its frozen route.
resolve_legacy_reasoning
Legacy path: reasoning_effort = "auto" outside an exact Fleet keeps its compatibility behavior and may use the caller’s local heuristic.
router_call_plan
Decide what a Router call runs at, given what the operator configured and what the Router’s own route can express.
router_system_prompt
System prompt for a Reasoning Router call.
router_user_message
The user turn for a Router call: the bounded summary, transmitted once.
transport_disclosure
The one honest sentence about transport that every exact-Fleet receipt carries, so a tool-surface fact is never read as an air-gap claim.