Skip to main content

Module reasoning_router

Module reasoning_router 

Source
Expand description

The Adaptive Reasoning Router — a saved, reusable service, not a Fleet member.

A Fleet answers who: the exact provider/model assignments an operator saved for each worker. A Reasoning Router answers a much smaller question, for an already frozen worker route: how hard should this already-chosen model think on this task? Those are different kinds of thing, so they are different kinds of value here:

  • A Router is never dispatchable. It has no role, no tools, no shell, no write authority, and no delegation budget. It cannot be named by a task.
  • A Router is referenced, not embedded. It is saved once at routers/<name>.toml and referenced by name from any number of Fleets, so two Fleets can share one Router configuration without duplicating it.
  • A Router never changes a route. Provider, model, member, role, tools, and permissions are all frozen before it is called and are not among the things it is allowed to answer.

§Cheap by construction

A Router call is a per-task tax on someone’s tokens, so its own reasoning is capped at RouterCallReasoningoff or low, nothing else. medium, high, and max are rejected at parse time rather than silently clamped: an operator who wrote high asked for something this service will not do, and quietly running at off while the file says high is exactly the kind of invisible substitution receipts exist to prevent.

The reverse lie is equally forbidden. A profile that asks for low is called at low wherever the route can express it; nothing here forces off and then reports low. Normalization against the route’s real capability is recorded on the receipt (see crate::fleet_reasoning::RouterCallDisclosure).

§Legacy inline routers

The prototype form — a [[members]] entry with kind = "router" inside the Fleet file — still parses, is labelled legacy_inline, and is normalized into the same CapturedReasoningRouter the named store produces. There is one runtime representation of the service, whichever way it was written.

Structs§

CapturedReasoningRouter
The Router service as frozen into a Workflow snapshot.
QualifiedRouterId
A Router identity qualified by the origin its definition came from.
ReasoningRouterProfile
A saved Router profile: one exact provider/model plus a cheap call ceiling.

Enums§

FleetRouterRef
How a Fleet points at its Router.
ReasoningRouterError
RouterCallReasoning
The reasoning a Router call itself may run at.

Constants§

LEGACY_INLINE_ROUTER_ORIGIN
Origin recorded for a Router that was written inline in a Fleet file.
REASONING_ROUTER_DIR
Directory (under each search root) that holds saved Router profiles.
REASONING_ROUTER_SCHEMA_KIND
Wire value of the schema key that selects a Router profile document.
REASONING_ROUTER_SCHEMA_REVISION
Current revision of the Router profile schema.
REASONING_ROUTER_SERVICE_KIND
Stable service label a receipt prints so the reader can tell at a glance that this is the reasoning service and not a Fleet member.