pub struct RouterPipeline {
pub weights: ScoringWeights,
/* private fields */
}Expand description
Routing pipeline state for a session.
Fields§
§weights: ScoringWeightsImplementations§
Source§impl RouterPipeline
impl RouterPipeline
pub fn new() -> Self
pub fn from_config(config: &RouterConfig) -> Self
Sourcepub fn route(
&mut self,
context: &Context,
) -> (f64, RouterTier, RouterPhase, DecisionMethod)
pub fn route( &mut self, context: &Context, ) -> (f64, RouterTier, RouterPhase, DecisionMethod)
Route a context to (score, tier, phase, method).
Decision cascade:
- Override? (pin / rule / scenario / context) → return immediately
- Signal fusion scoring (5 signals) → heuristic score → tier
- The caller (stream) handles LLM classification for ambiguous scores.
pub fn record_decision(&mut self, decision: RoutingDecision)
pub fn record_turn_cost(&mut self, cost: f64)
pub fn accumulated_cost(&self) -> f64
pub fn last_score(&self) -> f64
pub fn history(&self) -> &[RoutingDecision]
Sourcepub fn classifier_model(&self) -> Option<String>
pub fn classifier_model(&self) -> Option<String>
Get the classifier model identifier, if configured.
Trait Implementations§
Source§impl Debug for RouterPipeline
impl Debug for RouterPipeline
Auto Trait Implementations§
impl Freeze for RouterPipeline
impl RefUnwindSafe for RouterPipeline
impl Send for RouterPipeline
impl Sync for RouterPipeline
impl Unpin for RouterPipeline
impl UnsafeUnpin for RouterPipeline
impl UnwindSafe for RouterPipeline
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more