pub fn repack_saving_usd(
before_tokens: u64,
after_tokens: u64,
cost: &ModelCost,
) -> f64Expand description
Cache-write cost saved by re-seeding a compressed prefix instead of the full
one, in USD. On a cold prefix the provider re-writes regardless, so the saving
is the avoided write of the dropped tokens: (before − after) × cache_write.
Clamped to 0.0 when compression did not shrink the prefix.