Routing policy
Bind model-selection policy to a router, collect evidence, and publish reviewed routing changes.
A local routing policy controls model selection for a named router such as bitrouter/auto. Its versioned decisions live in policy-lock.yaml; bitrouter.yaml connects that artifact to the running router. Deployment configuration and caller access-control policies have separate responsibilities.
Start with bitrouter/auto to initialize a binding and send requests. Use Configuration for file discovery, secrets, schema validation, and reload behavior.
Let evidence improve the policy
The active lock determines request-time routes; unmatched fingerprints use its configured default tier. In alpha.33, both frozen and adaptive modes route from the lock and disable legacy request-time adequacy learning. Adequacy thresholds in a lock remain compiler inputs, not switches for live escalation or exploration.
After admitting evaluation results, freeze a snapshot and use its evidence root to compile a candidate. Publication requires policy.mode: adaptive in bitrouter.yaml; frozen mode permits inspection but refuses publication. Replace <EVIDENCE_ROOT> with the root returned by the freeze command, then review the mode and candidate before publishing:
bro policy status
bro eval snapshot freeze
bro policy compile --eval-snapshot <EVIDENCE_ROOT> --output candidate-policy.yaml
bro policy diff policy-lock.yaml candidate-policy.yaml
bro policy publish candidate-policy.yamlCompilation can add or update compiler-owned routes while preserving operator-authored routes. Publication validates the candidate and rejects stale or conflicting changes. Review and commit the resulting lock-file diff. To freeze later publication, set policy.mode: frozen in bitrouter.yaml and reload the configuration.
Evaluation and optimization
Evaluations documents sealed subjects, admitted results, frozen snapshots, and the bro optimize and bro policy compile workflows. bro optimize run authorizes one controller step and can publish a policy change without a separate review; use compile and publish for a manually reviewed candidate.
Use Telemetry to inspect the route and cost that actually served a request, and Model routing to understand selectors, candidate eligibility, and fallback.
How is this guide?