diff --git a/hive-c0re/src/hive_stats.rs b/hive-c0re/src/hive_stats.rs index 413661d8..3951fb40 100644 --- a/hive-c0re/src/hive_stats.rs +++ b/hive-c0re/src/hive_stats.rs @@ -101,9 +101,10 @@ pub type PriceTable = HashMap; /// Built-in fallback pricing, per **million** tokens. Used when the /// operator's [`PriceTable`] has no key matching the model. Figures are /// current Anthropic list prices for the Claude 4.x family (Opus 4.x, -/// Sonnet 4.x, Haiku 4.5); `cache_write` uses the default 5-minute -/// cache-TTL price. Keep in sync with the `services.hyperhive.modelPrices` -/// nix default (`nix/modules/hive-c0re.nix`). +/// Sonnet 4.x, Haiku 4.5); `cache_write` uses the 1-hour cache-TTL price, +/// which is the default through the Claude subscription the agents run +/// on. Keep in sync with the `services.hyperhive.modelPrices` nix default +/// (`nix/modules/hive-c0re.nix`). fn builtin_prices(model: &str) -> Prices { let m = model.to_ascii_lowercase(); if m.contains("opus") { @@ -111,14 +112,14 @@ fn builtin_prices(model: &str) -> Prices { input: 5.0, output: 25.0, cache_read: 0.5, - cache_write: 6.25, + cache_write: 10.0, } } else if m.contains("haiku") { Prices { input: 1.0, output: 5.0, cache_read: 0.1, - cache_write: 1.25, + cache_write: 2.0, } } else { // sonnet + unknown fallback @@ -126,7 +127,7 @@ fn builtin_prices(model: &str) -> Prices { input: 3.0, output: 15.0, cache_read: 0.3, - cache_write: 3.75, + cache_write: 6.0, } } } diff --git a/nix/modules/hive-c0re.nix b/nix/modules/hive-c0re.nix index 28013c70..05291b6d 100644 --- a/nix/modules/hive-c0re.nix +++ b/nix/modules/hive-c0re.nix @@ -447,27 +447,28 @@ in } ); # Current Anthropic list prices for the Claude 4.x family (Opus - # 4.x, Sonnet 4.x, Haiku 4.5); cache_write is the default 5-minute - # cache-TTL price. Keep in sync with `builtin_prices` in + # 4.x, Sonnet 4.x, Haiku 4.5); cache_write is the 1-hour cache-TTL + # price (the default through the Claude subscription the agents run + # on). Keep in sync with `builtin_prices` in # hive-c0re/src/hive_stats.rs. default = { opus = { input = 5.0; output = 25.0; cache_read = 0.5; - cache_write = 6.25; + cache_write = 10.0; }; sonnet = { input = 3.0; output = 15.0; cache_read = 0.3; - cache_write = 3.75; + cache_write = 6.0; }; haiku = { input = 1.0; output = 5.0; cache_read = 0.1; - cache_write = 1.25; + cache_write = 2.0; }; }; example = {