Codex usage metrics and cost estimates
Design reproducible usage aggregation and tests, handle absent model pricing, and label local usage estimates.
中文Install in Codex
Codex and a synthetic usage record. The record has no model pricing.
- Review `.agents/skills/metrics-quality/SKILL.md` and its requirements at the pinned GitHub commit.
- Create `.agents/skills/metrics-quality/` in your project and save the reviewed file as `.agents/skills/metrics-quality/SKILL.md`.
- Start Codex from that project's root, then type `$metrics-quality` and select the matching skill.
Example task
Use this synthetic record in the usage dashboard and check the aggregate and cost label.
model="unknown-demo"; inputTokens=300; outputTokens=120; pricing=null; billingSource="local subscription"What to check
Total usage is 420 tokens. Cost is unknown with no amount. Local subscription usage is labeled estimated. Processing the same record again produces the same results.
Original SKILL.md on GitHub · Updated
Frequently asked question
How should a Codex usage dashboard handle unknown model costs?
Keep the input and output token totals available and mark the cost unknown when pricing is absent. Label local usage estimated and test that repeated inputs yield identical results.