review: update default model prices to current Anthropic list pricing

Per operator request on the PR: the built-in/default prices were the old
Claude 3 numbers (opus 15/75, etc.). Update opus + haiku to the current
Claude 4.x family list pricing (cache_write = the default 5-minute cache
TTL); sonnet was already correct:

- opus:   input 5, output 25, cache_read 0.5,  cache_write 6.25
- sonnet: input 3, output 15, cache_read 0.3,  cache_write 3.75  (unchanged)
- haiku:  input 1, output 5,  cache_read 0.1,  cache_write 1.25

Updated in both builtin_prices (hive_stats.rs) and the nix modelPrices
default (hive-c0re.nix), with cross-reference "keep in sync" notes on
both sides. Also addresses the earlier reviewer note: dropped the
over-strong "single source of truth" wording in the --model-prices arg
doc (the nix default does mirror the numbers in production).
This commit is contained in:
iris 2026-06-08 19:34:56 +02:00
commit a9560ebb51
3 changed files with 30 additions and 21 deletions

View file

@ -89,9 +89,10 @@ enum Cmd {
/// model id; models not covered fall back to the built-in
/// estimate. Set via the `services.hyperhive.modelPrices` NixOS
/// option (whose default carries the full opus/sonnet/haiku
/// table). Defaults to `{}` here so a bare `hive-c0re serve`
/// leans entirely on the in-code `builtin_prices` fallback —
/// keeping a single source of truth for the numbers.
/// table — kept in sync with the in-code `builtin_prices`).
/// Defaults to `{}` here so a bare `hive-c0re serve` leans
/// entirely on `builtin_prices`; the NixOS default (every real
/// deployment) shadows it with the same operator-tunable table.
#[arg(long, default_value = "{}")]
model_prices: String,
},