pub struct ModelPrice {
pub model: String,
pub input: String,
pub output: String,
pub cache_read: Option<String>,
pub currency: String,
}Expand description
What one model costs, as the operator wrote it in the manifest.
Fields§
§model: StringThe model string as the provider reports it, matched exactly.
Not a pattern: a prefix rule would silently price claude-opus-5-mini
at claude-opus-5’s rate, and a wrong price is worse than none. The run
names the unpriced model, so configuring it is a copy and a paste.
input: StringCost of a million input tokens, as a decimal string.
output: StringCost of a million output tokens, as a decimal string.
cache_read: Option<String>Cost of a million cached input tokens, when the vendor discounts them.
Absent means cached input is charged at the input rate.
currency: StringThe currency these amounts are in, e.g. usd.
Trait Implementations§
Source§impl Clone for ModelPrice
impl Clone for ModelPrice
Source§fn clone(&self) -> ModelPrice
fn clone(&self) -> ModelPrice
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ModelPrice
impl Debug for ModelPrice
Source§impl<'de> Deserialize<'de> for ModelPrice
impl<'de> Deserialize<'de> for ModelPrice
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
impl Eq for ModelPrice
Source§impl PartialEq for ModelPrice
impl PartialEq for ModelPrice
Source§impl Serialize for ModelPrice
impl Serialize for ModelPrice
impl StructuralPartialEq for ModelPrice
Auto Trait Implementations§
impl Freeze for ModelPrice
impl RefUnwindSafe for ModelPrice
impl Send for ModelPrice
impl Sync for ModelPrice
impl Unpin for ModelPrice
impl UnsafeUnpin for ModelPrice
impl UnwindSafe for ModelPrice
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