feat(routing): add named routing profiles #24
Reference in New Issue
Block a user
Delete Branch "feat/named-routing-profiles"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
feat(routing): named routing profiles
Implements
auto:<profile>routing for the LLM router. A profile is a candidate-set filter (not a ranking or objective override). Built-ins:auto/auto:default— normal quality-first routing,-flexrows excludedauto:batch— admits-flexrows for overnight/async workauto:locality— restricts toollama-localprovider onlyauto:onlycheaps— limits to models priced at ≤ $0.50 per 1M completion tokensauto:bigboybritches— restricts to tier-3 (frontier) modelsOperators can add custom profiles under the
profiles:key inconfig/config.yaml. Each entry acceptsprovider,min_tier/max_tier,max_cost_per_1m_completion,latency_tolerance, andallowed_model_ids. Unknown profile names raise HTTP 422 with a sorted list of valid names.Verification
local_energy.enabled: trueandlocal_energy.enabled: false)/v1/modelslistsauto,auto:default,auto:batch,auto:locality,auto:onlycheaps,auto:bigboybritchesCommits
cc149e4feat(routing): add restrict_to allowlist primitiveb884cd1feat(config): add named routing profiles configuration09d5ccefeat(dispatcher): resolve auto: built-in/config profiles9b52b2afeat(db): migrate route_decisions.profile and surface in metricsb7f89e6feat(admin): add Profile column and filter to decisions pagec6392a6test(profiles): add integration tests for preserved behaviorsd48d1e1docs(profiles): document named routing profilesNotes
eligible_categories.rejection_reasonwithout therestrict_toargument, so profile-excluded rows are logged with reason"-"instead of"profile_excluded". This is a minor observability gap worth a follow-up but does not affect routing correctness./routesilently ignores unknown request fields. This means passingmodel: "auto:locality"to/routeis treated as the default route rather than rejected. This is pre-existing behavior; strict unknown-field rejection could be a future enhancement.d48d1e1e70toa872124bc5