From 7e626fcbb04f6b9e40a416a3fc7070b86cedccdb Mon Sep 17 00:00:00 2001 From: Factory Agent Date: Fri, 23 Oct 2026 15:15:00 +0700 Subject: [PATCH 1/2] Add Claude Mythos 5 and 5.1 pricing Add claude-mythos-5 and claude-mythos-5-1 to the built-in Claude pricing table. Both bill input at 10 and output at 50 per million tokens with a 12.50 cache write; Mythos 5.1 cache reads are 0.25 per million, Mythos 5 cache reads are 1.00 per million. Mythos is absent from the models.dev catalog, so the built-in rows are what prices it. Upstream report-semantics version bump and predecessor parser hash are macOS-specific and not ported. --- rust/src/core/cost_pricing.rs | 10 ++++++++++ rust/src/core/cost_pricing_tests.rs | 9 ++++++++- rust/src/cost_scanner/tests/claude_rates.rs | 15 +++++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/rust/src/core/cost_pricing.rs b/rust/src/core/cost_pricing.rs index f78a58cb59..3c69b9633d 100755 --- a/rust/src/core/cost_pricing.rs +++ b/rust/src/core/cost_pricing.rs @@ -231,6 +231,16 @@ static CLAUDE_PRICING: LazyLock> = LazyLock "claude-fable-5", ClaudePricing::new(1e-5, 5e-5, 1.25e-5, 1e-6), ), + // Mythos is served to verified organizations only and is absent from the models.dev + // anthropic catalog. Rates: https://platform.claude.com/docs/en/about-claude/pricing + ( + "claude-mythos-5", + ClaudePricing::new(1e-5, 5e-5, 1.25e-5, 1e-6), + ), + ( + "claude-mythos-5-1", + ClaudePricing::new(1e-5, 5e-5, 1.25e-5, 2.5e-7), + ), ("claude-haiku-4-5", CLAUDE_HAIKU_4_5), ("claude-haiku-4-5-20251001", CLAUDE_HAIKU_4_5), ("claude-opus-4-6", CLAUDE_OPUS_4_5), diff --git a/rust/src/core/cost_pricing_tests.rs b/rust/src/core/cost_pricing_tests.rs index dc8fc2edc8..18aed574b0 100644 --- a/rust/src/core/cost_pricing_tests.rs +++ b/rust/src/core/cost_pricing_tests.rs @@ -75,7 +75,12 @@ fn prices_codex_models() { #[test] fn prices_claude_models() { - for (model, expected) in [("claude-opus-4-8", 0.0175), ("claude-fable-5", 0.035)] { + for (model, expected) in [ + ("claude-opus-4-8", 0.0175), + ("claude-fable-5", 0.035), + ("claude-mythos-5", 0.035), + ("claude-mythos-5-1", 0.035), + ] { let cost = CostUsagePricing::claude_cost_usd(model, 1_000, 0, 0, 500).unwrap(); assert!((cost - expected).abs() < 1e-10, "{model}"); } @@ -790,6 +795,8 @@ gpt-6-astra 1e-5 5e-5 1e-6 Some(1.25e-5) None Some((2e-5, 7.5e-5, 2e-6, Some(2.5 claude-fable-5 1e-5 5e-5 1.25e-5 1e-6 None None None None None claude-haiku-4-5 1e-6 5e-6 1.25e-6 1e-7 None None None None None claude-haiku-4-5-20251001 1e-6 5e-6 1.25e-6 1e-7 None None None None None +claude-mythos-5 1e-5 5e-5 1.25e-5 1e-6 None None None None None +claude-mythos-5-1 1e-5 5e-5 1.25e-5 2.5e-7 None None None None None claude-opus-4-1 1.5e-5 7.5e-5 1.875e-5 1.5e-6 None None None None None claude-opus-4-20250514 1.5e-5 7.5e-5 1.875e-5 1.5e-6 None None None None None claude-opus-4-5 5e-6 2.5e-5 6.25e-6 5e-7 None None None None None diff --git a/rust/src/cost_scanner/tests/claude_rates.rs b/rust/src/cost_scanner/tests/claude_rates.rs index 01c2354a1c..4a749ba262 100644 --- a/rust/src/cost_scanner/tests/claude_rates.rs +++ b/rust/src/cost_scanner/tests/claude_rates.rs @@ -216,6 +216,21 @@ fn claude_fable_5_prices_five_minute_and_one_hour_cache_writes() { } } +#[test] +fn claude_mythos_models_price_from_the_builtin_table() { + // (model, cache read price per million): Mythos 5.1 bills cache reads at $0.25/M, + // Mythos 5 at $1/M. Both bill $10 in, $12.50 cache write, $50 out per million. + for (model, cache_read_per_million) in [("claude-mythos-5", 1.00), ("claude-mythos-5-1", 0.25)] + { + let cost = ClaudePricing::cost_usd_with_cache_ttl(model, 100, 10, 0, 20, 5); + let expected = (100.0 / 1_000_000.0) * 10.00 + + (10.0 / 1_000_000.0) * 12.50 + + (20.0 / 1_000_000.0) * cache_read_per_million + + (5.0 / 1_000_000.0) * 50.00; + assert!((cost - expected).abs() < 1e-12, "{model}"); + } +} + #[test] fn claude_scan_pricing_follows_the_canonical_table() { // Undated Sonnet 4.6 bills its full context at the standard $3/M: 240k = 0.72. From 130a7dbafcce3820390827c4320abc600f38cfa3 Mon Sep 17 00:00:00 2001 From: Factory Agent Date: Fri, 23 Oct 2026 20:31:06 +0700 Subject: [PATCH 2/2] Retrigger CI after runner out-of-memory