pub struct ModelProfile {
pub input_per_m: f64,
pub output_per_m: f64,
pub cache_read_per_m: f64,
pub cache_write_per_m: f64,
pub context_max: u64,
}Fields§
§input_per_m: f64§output_per_m: f64§cache_read_per_m: f64Price of a cache hit. Tabled rather than derived because the multiplier is per-model: 0.1x of base input for most models, but 0.05x on Opus 5.5 / Sonnet 5.5 and 0.025x on Fable 5.1.
cache_write_per_m: f64Price of a 5-minute cache write, the documented default. The
1-hour rate is derived — see ModelProfile::cache_write_1h_per_m.
context_max: u64Implementations§
Source§impl ModelProfile
impl ModelProfile
Sourcepub fn cache_write_1h_per_m(&self) -> f64
pub fn cache_write_1h_per_m(&self) -> f64
Price of a 1-hour cache write.
Unlike the read multiplier this one is universal — “1-hour cache write
tokens are 2 times the base input tokens price” — so it is computed
instead of occupying a column that would have to be kept in step with
input_per_m in every row.
Trait Implementations§
Source§impl Clone for ModelProfile
impl Clone for ModelProfile
impl Copy for ModelProfile
Source§impl Debug for ModelProfile
impl Debug for ModelProfile
Source§impl PartialEq for ModelProfile
impl PartialEq for ModelProfile
impl StructuralPartialEq for ModelProfile
Auto Trait Implementations§
impl Freeze for ModelProfile
impl RefUnwindSafe for ModelProfile
impl Send for ModelProfile
impl Sync for ModelProfile
impl Unpin for ModelProfile
impl UnsafeUnpin for ModelProfile
impl UnwindSafe for ModelProfile
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more