use super::{PriceTable, Rates};
const CACHE_READ_MULTIPLIER: f64 = 0.1;
const CACHE_CREATION_MULTIPLIER: f64 = 1.25;
pub(super) fn with_default_rates() -> PriceTable {
let mut t = PriceTable::new();
let invariant = "built-in rate literal must be finite and non-negative";
let anthropic = |prompt: f64, completion: f64| {
Rates::new(prompt, completion).with_cache_rates(
prompt * CACHE_READ_MULTIPLIER,
prompt * CACHE_CREATION_MULTIPLIER,
)
};
t.set("anthropic", "claude-sonnet-4-x", anthropic(0.003, 0.015))
.expect(invariant);
t.set("anthropic", "claude-opus-4-x", anthropic(0.015, 0.075))
.expect(invariant);
t.set("anthropic", "claude-haiku-4-x", anthropic(0.001, 0.005))
.expect(invariant);
t.set("openai", "gpt-4o", Rates::new(0.0025, 0.01))
.expect(invariant);
t.set("openai", "gpt-4o-mini", Rates::new(0.00015, 0.0006))
.expect(invariant);
t.set("google", "gemini-2.0-flash", Rates::new(0.0001, 0.0004))
.expect(invariant);
t.set("ollama", "*", Rates::new(0.0, 0.0)).expect(invariant);
t
}