Expand description
Unstable (feature: router) — may change or be removed
Model auto-routing for oxicode.
Provides intelligent model selection based on conversation structure
and behavioral signals. This is an opt-in feature — the user must
explicitly select router/auto or another profile in model selection.
Modules§
- classifier
- Classifiers for routing decisions.
- fallback
- Fallback chain for sequential model failover.
- profiles
- Profile management for the router.
- scoring
- Scoring functions for routing decisions.
- signals
- Signal extraction for routing decisions. Four signal types are extracted from the conversation context:
- types
- Router type definitions — tiers, phases, decisions, and configuration.
Structs§
- Behavioral
Signal - Signals derived from recent conversation behavior.
- Context
Budget Signal - Signals derived from token budget and cost constraints.
- Fallback
Chain - Ordered fallback chain that tries models sequentially.
- Message
Content Signal - Signal derived from the structural properties of the last user message.
- Provider
Model - Parsed
"provider/model-id"pair. - Routed
Tier Config - Configuration for a single tier within a profile.
- Router
Config - Top-level router configuration.
- Router
Pipeline - Routing pipeline state for a session.
- Router
Profile - A named routing profile mapping tiers to model configs.
- Router
Profiles - Indexed collection of routing profiles loaded from config.
- Router
Provider - Router provider implementing the
Providertrait. - Router
Snapshot - Snapshot of the current router state for UI display.
- Router
State - Session-scoped router state (for persistence across restarts).
- Routing
Decision - A single routing decision recording what was chosen and why.
- Routing
Score - Score produced by signal aggregation, mapped to a
RouterTier. - Scoring
Weights - Weights for combining routing signals into a composite score.
- Structural
Signal - Signals derived from the structure of the conversation.
- Vision
Signal - Signal derived from image content in the conversation.
Enums§
- Decision
Method - How the routing decision was made.
- Router
Phase - Phase of the conversation influencing routing decisions.
- Router
Tier - Routing tier representing model capability level.
Functions§
- compute_
score - Compute a composite routing score from all signals.
- get_
router_ pin - Get the current global router pin tier.
- lerp
- Linear interpolation between
aandb. - parse_
tier_ model - Parse the model field from a
RoutedTierConfig. - register_
router - Register the router provider and its profile models.
- set_
router_ pin - Set the global router pin tier. Used by
/router pin <tier>.