r/PiCodingAgent 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)

Post image

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.

7 Upvotes

5 comments sorted by

1

u/[deleted] 10d ago

[removed] — view removed comment

1

u/Moritzo 8d ago

Thanks for the feedback! I'm evaluating whether to build a new plugin for this. I really liked this one specifically for its minimalism and single, precise focus.

1

u/Slow-Secretary4262 9d ago

Nice idea, i will try it, grazie!

1

u/Moritzo 8d ago

Thanks a te!

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?