Yabanin Spend Audit
_generated: 2026-09-13 01:50:38 UTC_
Source: /Users/reireirei/PycharmProjects/PythonProject/startup/tokenrouter/datasets/audit/sample_traffic.jsonl
Pricing source: pkg/pricing/bundled.json (historical list prices, seeded from pkg/pricing/pricing.go)
Version: sha256:af4e6cba31df31ac0f6342f3bf17c84482236565d33fa0ce408f8780d929dc5c
As of: unknown
Usage-based estimate, not invoice reconciliation. Cached-token discounts, negotiated rates and provider service tiers are not included in audit totals.
1. Summary
- Requests: 600
- Total cost: $ 4.60 (input $ 2.28, output $ 2.32)
- Unpriced requests (no known price, excluded from $ totals): 14
- Window: 397h36m0s
| Model | Requests | Cost | Share | Unpriced |
|---|---|---|---|---|
| gpt-4o | 449 | $ 4.21 | 91.4% | |
| claude-3-5-sonnet-latest | 37 | $ 0.38 | 8.3% | |
| gpt-4o-mini | 100 | $ 0.01 | 0.3% | |
| internal-finetuned-7b | 14 | Unknown | 0.0% | yes |
| Provider | Requests | Share |
|---|---|---|
| openai | 549 | 91.7% |
| anthropic | 37 | 8.3% |
| (unknown) | 14 | 0.0% |
2. What we found
- Spend concentration — p50=$0.0075 p90=$0.0161 p99=$0.0222; top 1% of requests hold 2.5% of spend, top 10% hold 24.2%.
- Repeated-prefix bloat — 13 prompt prefixes (>= 20 repeats) carry 852418 prompt tokens; $2.03 of spend is repeated context.
- Top prompt clusters — top 17 repeated prompts hold $4.60 of spend (largest $0.73 across 96 requests).
- Error waste — 32 error responses billed for $0.24 of output tokens.
- Tail latency — gpt-4o p95=4906ms; gpt-4o-mini p95=3056ms; claude-3-5-sonnet-latest p95=4109ms; internal-finetuned-7b p95=2728ms
- Model-mix drift — model share shifted across 65 day-model points within the window.
3. Cache simulation (exact)
- Hit rate: 59.8%
- Tokens avoided: 660678
- Dollars avoided: $ 2.59
| Model | Requests | Hit rate |
|---|---|---|
| gpt-4o | 449 | 66.1% |
| gpt-4o-mini | 100 | 57.0% |
| claude-3-5-sonnet-latest | 37 | 13.5% |
| internal-finetuned-7b | 14 | 0.0% |
4. Routing simulation (rule_tier)
| Class | Requests |
|---|---|
| easy | 426 |
| hard | 79 |
| medium | 95 |
- Routing-only savings (all requests): $ 2.65
- Routing-on-misses savings (production order): $ 0.70
- Unpriced targets dropped: 50
- **Combined savings (cache + routing on misses): $ 3.29** (overlap $ 1.95 not double-counted)
5. Data quality
- Parsed: 600, skipped: 0
- Ingestion denominator: 600 lines (parsed + skipped)
- Ingestion cap: 5000000 records
- Rows with real token counts: 100.0%
- Rows with timestamps: 100.0%
- Unpriced requests: 14
- Unpriced models: internal-finetuned-7b
6. Recommendations
- Investigate the top spenders — The top 1% of requests hold 2.5% of spend; confirm each is intended before scaling it.
- Cache the system prefix — 13 repeated prefixes cost $2.03 of prompt tokens; provider prompt caching may discount eligible repeated input; confirm model-specific rates.
- Stop paying for errors — 32 error responses billed $0.24 of output tokens.
- Enable cache + tier routing — Simulated combined savings of $3.29 (cache $2.59 + routing on misses $2.65; overlap $1.95 not double-counted).