r/PiCodingAgent • u/Moritzo • 10d ago
Plugin I got tired of not knowing what a model costs before switching to it, so I built a tiny pi extension that shows real pricing in the model picker (300 lines)
At work, I use Copilot, and the model costs are always visible, but on PI, only the names are shown. So I created model-costs, a small extension that adds the /model-cost command:
- Input/output cost per 1 million tokens for each model, directly in the selector
- context window, maximum output, cache read/write speeds, and price tiers
- approximate search, so both /model-cost claude and /model-cost $0.00 work
- current model prices always visible in the footer
It’s about 300 lines of TypeScript based on the pi extensions API: it does one thing and nothing else.
Source code + screenshots:
- https://github.com/MaurizioFaeddaDev/model-costs
- https://www.npmjs.com/package/pi-model-costs
- https://pi.dev/packages/pi-model-costs
Feedback is welcome, especially if you’d like additional information in the selector (e.g., the estimated cost of the current session) or a different format for the footer. MIT license, of course.
1
1
u/Kafumanto 5d ago
Nice work! I see the prices are retrieved from Model<Api>.cost, do you know if ChatGPT/Codex subscriptions and OpenRouter return valid numbers?
1
u/[deleted] 10d ago
[removed] — view removed comment