Skip to main content

Module routing

Module routing 

Source
Expand description

Smart routing: classify each user turn as simple or strong and route to different models (OpenClaude pattern), plus per-agent model routing.

Structs§

AgentRoute
A per-agent model/provider override (OpenClaude agentModels pattern).
AgentRouter
Routes agent names to configured models, falling back to a default.
RoutingConfig
Configuration for smart routing between a simple and a strong model.
RoutingStats
Aggregate statistics produced by a SmartRouter.
SmartRouter
Routes prompts to a simple or strong model based on turn complexity.

Enums§

TurnComplexity
Classification of a single user turn.

Functions§

classify_turn
Heuristic classifier: simple turns are short, code-free, and lack reasoning keywords; strong turns are long, contain code blocks, or mention reasoning keywords.