What do you want to change?
Add runtime pricing overrides via ccusage.json, and make the Pi adapter respect CostMode when calculating cost.
Today Pi logs always write usage.cost.total = 0, and the Pi parser takes that value verbatim. That means Pi usage shows $0.00 in Auto mode even when token usage is present.
I'd like to:
- make Pi use calculate_cost_for_usage(...) instead of trusting usage.cost.total
- add a pricingOverrides config section so users can override per-model pricing and context limits at runtime
Why?
Fuzzy model matching already covers most naming differences, so the built-in pricing works well in many cases.
But there are still real cases where users need local overrides:
- Pi logs do not include usable cost data
- private deployments / internal proxies may use non-public pricing
- LiteLLM pricing can be stale
- custom models may need maxInputTokens
- some models may not be in LiteLLM yet
How? (optional)
- Add pricingOverrides to config, keyed by model name
- Extend PricingMap to apply overrides after embedded / LiteLLM pricing is loaded
- Allow overrides for token pricing fields, cache pricing, fastMultiplier, and maxInputTokens
- Pass the resolved pricing map into Pi parsing so Pi cost follows normal Display / Auto / Calculate behavior
What do you want to change?
Add runtime pricing overrides via ccusage.json, and make the Pi adapter respect CostMode when calculating cost.
Today Pi logs always write usage.cost.total = 0, and the Pi parser takes that value verbatim. That means Pi usage shows $0.00 in Auto mode even when token usage is present.
I'd like to:
Why?
Fuzzy model matching already covers most naming differences, so the built-in pricing works well in many cases.
But there are still real cases where users need local overrides:
How? (optional)