Saphan StudioDocs
Reference/Command reference

saphan cost

Per-stream cost rollup from the record — one run or a sum of continuations

saphan cost

Per-stream cost rollup from the record — one run or a sum of continuations

saphan cost <stream>

Group run_record by stream: the run COUNT up front, each run_id with its normalized USD and status, and the stream total — so "$X = one run" vs "$X = a sum of continuations" is read at a glance, never a hand sqlite3 query (PROCESS_AUDIT gap #6 NO-STREAM-COST-ROLLUP).

The cost_ledger kind-split is scoped to what the live schema can PROVE belongs to the stream (session == stream, true only for kind=run rows); refusal and pin-bypass rows carry no run_id or stream today and are named as an honest gap rather than guessed at.

Each run row names its MODEL, because the anchor of cost is the pair (scope x model).

Each run row also carries its TOKEN VECTOR (in/cached/out/thoughts), read from the run's OWN stored transcript capture — with per-(backend, model) subtotals at the bottom. A cross-backend token total is REFUSED in prose, never printed and never zero: tokenizers differ between vendors, so a token is comparable ONLY within (backend, model). A run whose capture carries no readable usage names that absence instead of printing a number.

On this page