Files
llmgw/internal/store/migrations/sqlite/0053_held.sql
T
Ilker ManapandClaude Opus 5.5 8547528fb7
CI / test (push) Successful in 9m51s
Prices from what the cluster costs: ctl prices suggest
auth.gpu_hour_cost (and core_hour_cost) is what an hour of a GPU (a core)
costs the operator. The leader keeps, by the hour, the GPU- and core-hours
each model's replicas hold (held_1h); llmgw ctl prices suggest spreads a
model's over the tokens it served, an output token counted as four input
ones and a cached prompt token as a tenth of one, and --apply writes the
prices into auth.pricing. Idle hours are in the cost, so a model held and
little used comes out dear; one held and billed nothing is shown with what
it held.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 06:54:55 +01:00

11 lines
416 B
SQL

-- What each model held of the cluster, an hour at a time: its replicas'
-- GPUs and, for one on CPUs, its cores, in seconds. With the tokens it
-- served, it is what a token of it cost (llmgw ctl prices suggest).
CREATE TABLE held_1h (
bucket BIGINT NOT NULL,
model TEXT NOT NULL,
gpu_seconds BIGINT NOT NULL DEFAULT 0,
core_seconds BIGINT NOT NULL DEFAULT 0,
PRIMARY KEY (bucket, model)
);