pub struct ModelTierConfig {
pub name: String,
pub models: Vec<String>,
pub complexity_range: [f32; 2],
pub cost_per_1k_tokens: f64,
pub max_context_tokens: usize,
}Expand description
A named group of models at a similar cost/capability level.
Tiers are ordered from cheapest to most expensive in the tiers array.
Complexity ranges may overlap intentionally – the router picks the
highest-quality tier the user is allowed and can afford.
Fields§
§name: StringTier name (e.g., "free", "standard", "premium", "elite").
models: Vec<String>Models available in this tier, in preference order.
Format: "provider/model" (e.g., "anthropic/claude-haiku-3.5").
complexity_range: [f32; 2]Complexity range this tier covers: [min, max] where each is 0.0-1.0.
cost_per_1k_tokens: f64Approximate cost per 1K tokens (blended input/output) in USD.
max_context_tokens: usizeMaximum context tokens supported by models in this tier.
Trait Implementations§
Source§impl Clone for ModelTierConfig
impl Clone for ModelTierConfig
Source§fn clone(&self) -> ModelTierConfig
fn clone(&self) -> ModelTierConfig
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 ModelTierConfig
impl Debug for ModelTierConfig
Source§impl Default for ModelTierConfig
impl Default for ModelTierConfig
Source§impl<'de> Deserialize<'de> for ModelTierConfig
impl<'de> Deserialize<'de> for ModelTierConfig
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 ModelTierConfig
impl RefUnwindSafe for ModelTierConfig
impl Send for ModelTierConfig
impl Sync for ModelTierConfig
impl Unpin for ModelTierConfig
impl UnsafeUnpin for ModelTierConfig
impl UnwindSafe for ModelTierConfig
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