#[non_exhaustive]pub struct ModelPricing {
pub multiplier: Option<f64>,
pub overrides: Option<BTreeMap<String, ModelRates>>,
pub extra: Extra,
}Expand description
modelPricing: contracted rates (managed settings).
Report spend at the rates your organization pays instead of list price. Set it when your organization has contracted rates, so the dollar figures developers see match your bill.
Docs: modelPricing.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.multiplier: Option<f64>Scales every cost Claude Code computes, whether or not an overrides row covers it.
Below 1 is a discount, above 1 a markup.
- Values: number greater than 0 and at most 10
- Default: unset
Docs: multiplier.
overrides: Option<BTreeMap<String, ModelRates>>The USD-per-million-token rates for that model, all four required. cacheWrite covers
both five-minute and one-hour cache writes. See Which models a row applies
to.
- Values: map of model ID to a rate object with
input,output,cacheRead, andcacheWrite, each 0 to 10000 - Default: unset
Docs: overrides.
extra: ExtraKeys Claude Code accepts here that this crate doesn’t model (newer or undocumented ones), kept as written so the document round-trips.
Trait Implementations§
Source§impl Clone for ModelPricing
impl Clone for ModelPricing
Source§impl Debug for ModelPricing
impl Debug for ModelPricing
Source§impl Default for ModelPricing
impl Default for ModelPricing
Source§impl<'de> Deserialize<'de> for ModelPricing
impl<'de> Deserialize<'de> for ModelPricing
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
Source§impl PartialEq for ModelPricing
impl PartialEq for ModelPricing
Source§impl Serialize for ModelPricing
impl Serialize for ModelPricing
impl StructuralPartialEq for ModelPricing
Auto Trait Implementations§
impl Forget for ModelPricing
impl Freeze for ModelPricing
impl Move for ModelPricing
impl RefUnwindSafe for ModelPricing
impl Send for ModelPricing
impl Sync for ModelPricing
impl Unpin for ModelPricing
impl UnsafeUnpin for ModelPricing
impl UnwindSafe for ModelPricing
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