vllm-project/semantic-router
View on GitHubExtend Router Learning adaptation composition
Open
#2,241 opened on Jun 18, 2026
area/agentarea/corearea/model-selectionenhancementhelp wantedpriority/P2roadmap
Repository metrics
- Stars
- (4,293 stars)
- PR merge metrics
- (PR metrics pending)
Description
Parent: #2238
Depends on: #2239
Related: #2240, #2308, #2346
Goal
Extend Router Learning's typed adaptation evidence and final-decision explanation while preserving the current fixed pipeline and one operator-facing strategy selection.
Audited current-main baseline (2026-07-15)
Current main composes learning in this order:
base recipe selection
-> protection preflight
-> one adaptation strategy (default: routing_sampling)
-> protection switch/hold/rescue
-> final logical model + typed diagnostics
It does not implement the previously described method-keyed composer for simultaneous bandit, Elo, personalization, and cache/cost adapters. Those historical names are not current public Router Learning config.
Scope
- Define a typed contribution/explanation contract for evidence used by one strategy: source, score/delta, uncertainty, freshness, sample count, suppression reason, and provenance.
- Preserve one final adaptation proposal before protection; avoid multiple components mutating the model independently.
- If future strategies combine evidence internally, define normalization, tie-breaking, missing/stale evidence, and deterministic ordering within that strategy.
- Keep protection a separate hard boundary that can suppress sampling, hold the current model, or rescue a route.
- Keep headers compact; detailed evidence belongs in typed Replay diagnostics.
- Prove observe/apply/bypass behavior and candidate-set boundaries under conflicts.
- Benchmark added complexity through #2346 before adding a new production strategy.
Non-goals
- Do not expose
adaptations.bandit,adaptations.elo,adaptations.personalization, or other legacy method-keyed public blocks. - Do not soften authorization, safety, privacy, residency, context, explicit decision bypass, or protection rules.
- Do not turn the composer into a general multi-objective policy language.
- Do not add synchronous durable evidence reads.
Acceptance criteria
- One adaptation proposal and one final protection decision remain reconstructable.
- Evidence contributions are typed, bounded, and deterministic.
- Missing/stale/conflicting evidence and ties have explicit behavior.
- Observe mode records the proposed result without changing the final model.
- Decision bypass prevents both adaptation and protection changes as defined by the contract.
- Headers remain bounded and Replay contains the detailed trace.
- Tests cover conflict, tie, hard constraint, protection override, observe/apply/bypass, and reload.
Validation entrypoint
make agent-report ENV=cpu CHANGED_FILES="<space-separated changed files>"