pub struct ModelRoutingConfig {
pub enabled: bool,
pub cheap: Option<ModelConfig>,
pub mid: Option<ModelConfig>,
pub expensive: Option<ModelConfig>,
}Expand description
Configuration for smart model routing based on query complexity.
When enabled, messages are classified into tiers (cheap / mid / expensive) using keyword heuristics, and routed to the appropriate model. If a tier’s model is not configured, the default model is used as fallback.
Fields§
§enabled: boolWhether model routing is enabled. When false, the default model is
used for all messages (backward-compatible default).
cheap: Option<ModelConfig>Model for simple messages (greetings, yes/no answers). Cheap nano-tier.
mid: Option<ModelConfig>Model for tool-calling messages (search, email, calendar, etc.).
expensive: Option<ModelConfig>Model for complex reasoning (analysis, comparison, code review, etc.).
Trait Implementations§
Source§impl Clone for ModelRoutingConfig
impl Clone for ModelRoutingConfig
Source§fn clone(&self) -> ModelRoutingConfig
fn clone(&self) -> ModelRoutingConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModelRoutingConfig
impl Debug for ModelRoutingConfig
Source§impl Default for ModelRoutingConfig
impl Default for ModelRoutingConfig
Source§fn default() -> ModelRoutingConfig
fn default() -> ModelRoutingConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ModelRoutingConfig
impl<'de> Deserialize<'de> for ModelRoutingConfig
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ModelRoutingConfig
impl RefUnwindSafe for ModelRoutingConfig
impl Send for ModelRoutingConfig
impl Sync for ModelRoutingConfig
impl Unpin for ModelRoutingConfig
impl UnsafeUnpin for ModelRoutingConfig
impl UnwindSafe for ModelRoutingConfig
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