Repository navigation
feat: runtime pricing overrides via config #1198
Description
Activity
This issue was auto-closed. Issues from new contributors are auto-closed by default.
Maintainers review auto-closed issues and reopen worthwhile ones. Issues that do not meet the quality bar in CONTRIBUTING.md may not be reopened or receive a reply.
Keep the issue short, concrete, and written in your own voice.
If a maintainer replies
lgtmi, your future issues will stay open. If a maintainer replieslgtm, your future issues and PRs will stay open.See CONTRIBUTING.md.
Check commit in my forked repository for code changes if you feel it is needed:
xiaoMaJia707@4497d22Best Regards.
thanks! lmc
Thank you, I will try to formally create a PR for your review.
Opened the PR: #1204 — auto-closed by the contributor gate. Let me know
if you'd like to take a look or want me to revise anything before reopening.Heads-up: PR description has a "Known limitations" section flagging a ~28s
slowdown in--mode calculatewhen the models in use aren't covered by
either built-in pricing or overrides. Looks like a pre-existing
characteristic ofPricingMap::findfor unknown models, surfaced now that
Pi goes through the pricing path on my local setup — once overrides privices are
filled in, runtime returns to ~0.2s.Thank you @ryoppippi for taking the time to finish this PR. I’m sorry I couldn't get around to it yesterday, your improvements look great!
Reacted by ryoppippi- addedtriage:resolvedResolved by a later change or current implementation.Resolved by a later change or current implementation.
on Aug 31, 2026 Historical audit: this discussion was auto-closed by the legacy contributor gate. That closure did not assess technical importance.
Audit result: resolved. A later merged change or the current
mainimplementation covers this request. This item is kept for history and does not need to be reopened.
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)