pub struct Route {
pub match_: Match,
pub mode: Mode,
pub ladder: Vec<String>,
pub gates: Vec<String>,
pub deferred_gates: Vec<String>,
pub routing_mode: Option<RoutingMode>,
pub rollout: Option<Rollout>,
pub shadow: Option<Shadow>,
}Expand description
One routing rule.
Fields§
§match_: MatchThe traffic this route claims. An empty match ({}) matches everything.
mode: ModeServing mode.
ladder: Vec<String>Model ladder, cheapest first, as provider/model strings.
gates: Vec<String>Inline gates run before serving (enforce mode).
deferred_gates: Vec<String>Gates run asynchronously after serving; their verdicts attach to the trace as a learning signal and never block the response.
routing_mode: Option<RoutingMode>Per-route routing-mode preset. Overrides FIRSTPASS_MODE_PROFILE; overridden by the
per-request x-firstpass-mode header. Absent (default None) falls through to the
global default, then Balanced — byte-identical to existing behaviour.
rollout: Option<Rollout>Percentage rollout (ADR 0009 D1): enforce only a slice of this route’s matched traffic, held constant per session so a conversation never flips arm mid-thread. Absent (the default) enforces all matched traffic — byte-identical to existing behaviour.
shadow: Option<Shadow>Shadow scoring (ADR 0009 D2): on a sample of observed requests, run the ladder off the
hot path and record what would have been served and what it would have cost. Absent (the
default) leaves observe exactly as it was. Makes real model calls when enabled, which is
why max_usd_per_day is required rather than defaulted.