pub struct RoutingConfig {
pub min_observations: u64,
pub quality_weight: f64,
pub latency_weight: f64,
pub cost_weight: f64,
pub max_latency_ms: Option<u64>,
pub max_cost_usd: Option<f64>,
pub prefer_local: bool,
pub prior_strength: f64,
pub quality_first_cold_start: bool,
pub bootstrap_min_task_observations: u64,
pub bootstrap_quality_floor: f64,
}Expand description
Configuration for routing behavior.
Fields§
§min_observations: u64Minimum observations before trusting a model’s profile over schema defaults.
quality_weight: f64Scoring weights (must sum to 1.0).
latency_weight: f64§cost_weight: f64§max_latency_ms: Option<u64>Hard constraint: maximum latency budget in ms.
max_cost_usd: Option<f64>Hard constraint: maximum cost per call in USD.
prefer_local: boolPrefer local models over remote (all else being equal).
prior_strength: f64Thompson Sampling prior strength. Higher = more weight on the Phase 2 score as a prior, lower = more influenced by observed outcomes. Equivalent to the number of “virtual” observations from the prior.
quality_first_cold_start: boolPrefer trusted remote models for quality-critical tasks until local models have enough task-specific evidence to be promoted.
bootstrap_min_task_observations: u64Minimum task-specific observations required before a local model can compete with trusted remote models during cold start.
bootstrap_quality_floor: f64Minimum task-specific EMA quality required before a local model can displace trusted remote models during cold start.
Trait Implementations§
Source§impl Clone for RoutingConfig
impl Clone for RoutingConfig
Source§fn clone(&self) -> RoutingConfig
fn clone(&self) -> RoutingConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RoutingConfig
impl Debug for RoutingConfig
Source§impl Default for RoutingConfig
impl Default for RoutingConfig
Source§impl<'de> Deserialize<'de> for RoutingConfig
impl<'de> Deserialize<'de> for RoutingConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for RoutingConfig
impl RefUnwindSafe for RoutingConfig
impl Send for RoutingConfig
impl Sync for RoutingConfig
impl Unpin for RoutingConfig
impl UnsafeUnpin for RoutingConfig
impl UnwindSafe for RoutingConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more