remove the hive dashboard's stats page and the price table behind it
The ST4TS page (/stats.html), GET /api/stats-hive, hive-c0re's hive_stats rollup and the modelPrices option that only fed its cost estimate are gone. Each agent's own /stats page and the turn-stats database it reads are unchanged. Setting modelPrices now fails evaluation with a message saying so.
This commit is contained in:
parent
1d3ab2fae5
commit
5e9a22cb38
3 changed files with 112 additions and 1207 deletions
|
|
@ -242,10 +242,6 @@ in
|
|||
"c0re"
|
||||
"preBuildAgentTemplates"
|
||||
] agentPrebuildRemoved)
|
||||
(lib.mkRenamedOptionModule
|
||||
[ "services" "hyperhive" "c0re" "modelPrices" ]
|
||||
[ "services" "hyperhive" "deploy" "hive-controller" "modelPrices" ]
|
||||
)
|
||||
(lib.mkRenamedOptionModule
|
||||
[ "services" "hyperhive" "c0re" "agentCpuQuota" ]
|
||||
[ "services" "hyperhive" "deploy" "hive-controller" "agentCpuQuota" ]
|
||||
|
|
|
|||
|
|
@ -61,8 +61,7 @@ let
|
|||
# The `hive-c0re serve` config JSON. Keys are snake_case to match the
|
||||
# `ServeConfig` serde shape the daemon deserialises (the
|
||||
# container-injected HiveEnv fields, flattened, plus the hive-c0re-local
|
||||
# model_prices table); per-flag overrides still work for ad-hoc
|
||||
# invocations.
|
||||
# build_slots); per-flag overrides still work for ad-hoc invocations.
|
||||
#
|
||||
# Written to `/etc/hyperhive/serve.json` (managed by
|
||||
# `environment.etc`) rather than embedded as a store-path argument in
|
||||
|
|
@ -97,7 +96,6 @@ let
|
|||
agent_memory_max = controllerCfg.agentMemoryMax;
|
||||
agent_cpu_weight = controllerCfg.agentCpuWeight;
|
||||
agent_io_weight = controllerCfg.agentIoWeight;
|
||||
model_prices = controllerCfg.modelPrices;
|
||||
build_slots = controllerCfg.buildSlots;
|
||||
};
|
||||
in
|
||||
|
|
|
|||
|
|
@ -11,6 +11,10 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
modelPricesRemoved = ''
|
||||
The hive dashboard no longer has a stats page, and the price table only fed
|
||||
its cost estimate. Remove this definition.
|
||||
'';
|
||||
agentPrebuildRemoved = ''
|
||||
Hives pull agent closures from the swarm cache; nothing builds locally, so
|
||||
there is no agent-base closure to pre-fetch into the host store. Remove
|
||||
|
|
@ -36,6 +40,14 @@ in
|
|||
"hive-controller"
|
||||
"preBuildAgentTemplates"
|
||||
] agentPrebuildRemoved)
|
||||
(lib.mkRemovedOptionModule [ "services" "hyperhive" "c0re" "modelPrices" ] modelPricesRemoved)
|
||||
(lib.mkRemovedOptionModule [
|
||||
"services"
|
||||
"hyperhive"
|
||||
"deploy"
|
||||
"hive-controller"
|
||||
"modelPrices"
|
||||
] modelPricesRemoved)
|
||||
(lib.mkRemovedOptionModule [ "services" "hyperhive" "c0re" "hyperhiveDocs" ] ''
|
||||
Agents take their reference docs from the pinned `hyperhive` input, which
|
||||
carries `docs/`. Remove this definition.
|
||||
|
|
@ -121,80 +133,6 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
modelPrices = lib.mkOption {
|
||||
type = lib.types.attrsOf (
|
||||
lib.types.submodule {
|
||||
options = {
|
||||
input = lib.mkOption {
|
||||
type = lib.types.numbers.nonnegative;
|
||||
description = "USD per million input tokens.";
|
||||
};
|
||||
output = lib.mkOption {
|
||||
type = lib.types.numbers.nonnegative;
|
||||
description = "USD per million output tokens.";
|
||||
};
|
||||
cache_read = lib.mkOption {
|
||||
type = lib.types.numbers.nonnegative;
|
||||
description = "USD per million cache-read tokens.";
|
||||
};
|
||||
cache_write = lib.mkOption {
|
||||
type = lib.types.numbers.nonnegative;
|
||||
description = "USD per million cache-creation (write) tokens.";
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
# Current Anthropic list prices for the Claude 4.x family (Opus
|
||||
# 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/stats/hive_stats.rs.
|
||||
default = {
|
||||
opus = {
|
||||
input = 5.0;
|
||||
output = 25.0;
|
||||
cache_read = 0.5;
|
||||
cache_write = 10.0;
|
||||
};
|
||||
sonnet = {
|
||||
input = 3.0;
|
||||
output = 15.0;
|
||||
cache_read = 0.3;
|
||||
cache_write = 6.0;
|
||||
};
|
||||
haiku = {
|
||||
input = 1.0;
|
||||
output = 5.0;
|
||||
cache_read = 0.1;
|
||||
cache_write = 2.0;
|
||||
};
|
||||
};
|
||||
example = {
|
||||
sonnet = {
|
||||
input = 3.0;
|
||||
output = 15.0;
|
||||
cache_read = 0.3;
|
||||
cache_write = 6.0;
|
||||
};
|
||||
};
|
||||
description = ''
|
||||
Per-model USD prices (per **million** tokens) used for the
|
||||
hive-wide cost *estimate* on the dashboard's ST4TS tab. Each key
|
||||
is a model-family short name matched case-insensitively as a
|
||||
substring of the active model id at runtime (e.g. `"sonnet"`
|
||||
matches `"claude-sonnet-4-5"`); the longest matching key wins, so
|
||||
a specific entry beats a generic family name. Any model not
|
||||
covered by this table falls back to hive-c0re's built-in
|
||||
estimate.
|
||||
|
||||
The defaults track Anthropic list pricing at the time of
|
||||
writing — override them here to keep the estimate current
|
||||
without a code change. Passed to `hive-c0re serve` as JSON via
|
||||
`--model-prices`; read only by hive-c0re itself (not injected
|
||||
into containers). Changes apply on the next host rebuild.
|
||||
'';
|
||||
};
|
||||
|
||||
agentCpuQuota = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "200%";
|
||||
|
|
|
|||
Loading…
Reference in a new issue