Repository navigation
Open
Labels
bugSomething isn't workingSomething isn't workingready-for-agentFully specified, ready for an AFK agentFully specified, ready for an AFK agentwayfinder:taskWayfinder implementation taskWayfinder implementation task
Description
Summary
The Gateway summary presents the cost calculated from a small priced subset as if it covered all usage. When most requests lack pricing, the result is a partial sum but visually reads as the total estimated cost.
Live reproduction
The running snapshot reported:
176,092,215total tokens;1,452requests;1,448requests missing model pricing;- only 4 requests contributing to cost;
- displayed estimated cost: approximately
$0.05.
This produces an implausible effective rate of about $0.00027 per million tokens. The backend cost_label states that 1,448 requests are missing pricing, but the primary UI amount does not expose coverage.
Expected behavior
A partial estimate must not be presented as a complete total.
Recommended states:
- fully priced:
$X.XX estimated; - partially priced:
$X.XX partial estimate · 4/1452 requests priced; - no priced requests:
Cost unavailable; - missing usage and missing pricing shown as separate coverage dimensions.
Acceptance criteria
- Return explicit
priced_requests,unpriced_requests, priced token totals, and coverage percentage. - Distinguish no estimate, partial estimate, and complete estimate in the UI.
- Never format unknown/unpriced usage as
$0.00. - Show coverage in the summary card and accessible details.
- Cost charts and grouped summaries carry the same semantics.
- Filters and date windows recompute cost and coverage over the same events.
- Add regression tests for 0%, partial, and 100% pricing coverage.
Related
- Refresh OpenAI pricing and support context/service-tier rates #86 updates OpenAI pricing, but this remains necessary because third-party and newly discovered models can always be unpriced.
Relevant code
src-tauri/src/gateway/telemetry.rsfrontend/src/components/StackedUsageChartShell.tsx
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingready-for-agentFully specified, ready for an AFK agentFully specified, ready for an AFK agentwayfinder:taskWayfinder implementation taskWayfinder implementation task
Activity