pub struct SavingsAssumptions {
pub price_in_per_mtok: f64,
pub cache_write_mult: f64,
pub cache_read_mult: f64,
pub reread_turns: f64,
}Expand description
Assumptions behind estimate_saved_cost. Token reduction is not the
same thing as billed-cost reduction (arXiv:2607.12161): with provider
prompt caching, a tool-output token is written to the cache once at a
write premium and then re-read at a steep discount on every subsequent
turn. A saved token therefore avoids one cache write plus N cache
reads — not one list-price input token.
Fields§
§price_in_per_mtok: f64USD per 1M input tokens at the list price.
cache_write_mult: f64Cache-write premium over the input price (Anthropic: 1.25).
cache_read_mult: f64Cache-read discount multiplier (Anthropic: 0.10).
reread_turns: f64Expected number of subsequent turns that re-read the saved tokens before the session ends or compacts.
Trait Implementations§
Source§impl Clone for SavingsAssumptions
impl Clone for SavingsAssumptions
Source§fn clone(&self) -> SavingsAssumptions
fn clone(&self) -> SavingsAssumptions
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 SavingsAssumptions
impl Debug for SavingsAssumptions
Auto Trait Implementations§
impl Freeze for SavingsAssumptions
impl RefUnwindSafe for SavingsAssumptions
impl Send for SavingsAssumptions
impl Sync for SavingsAssumptions
impl Unpin for SavingsAssumptions
impl UnsafeUnpin for SavingsAssumptions
impl UnwindSafe for SavingsAssumptions
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