pub struct ModelCost {
pub input: f64,
pub output: f64,
pub cache_read: Option<f64>,
pub cost_tiers: Vec<CostTier>,
}Expand description
Cost information for the model (per million tokens)
Fields§
§input: f64Input cost per million tokens (USD)
output: f64Output cost per million tokens (USD)
cache_read: Option<f64>Cached read cost per million tokens (USD), if supported
cost_tiers: Vec<CostTier>Tiered pricing that applies when prompt tokens exceed context thresholds. When present, the highest matching tier replaces the base rates for the whole request.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ModelCost
impl<'de> Deserialize<'de> for ModelCost
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 ModelCost
impl RefUnwindSafe for ModelCost
impl Send for ModelCost
impl Sync for ModelCost
impl Unpin for ModelCost
impl UnsafeUnpin for ModelCost
impl UnwindSafe for ModelCost
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