pi-model-costs

Pricing-aware model picker for pi: select models with per-1M-token cost, context window, cache rates, tiers and reasoning support.

Packages

Package details

extension

Install pi-model-costs from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-model-costs
Package
pi-model-costs
Version
1.0.0
Published
Aug 25, 2026
Downloads
137/mo · 137/wk
Author
maurizio.faedda.dev
License
MIT
Types
extension
Size
15.9 KB
Dependencies
0 dependencies · 4 peers
Pi manifest JSON
{
  "extensions": [
    "./model-costs.ts"
  ],
  "image": "https://raw.githubusercontent.com/MaurizioFaeddaDev/model-costs/main/images/model-cost.png"
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

model-costs

Pricing-aware model picker for pi (https://pi.dev). The built-in /model selector does not show pricing — this extension adds a model picker that shows the real cost of each model before you switch.

Features

  • /model-cost [query] — model picker with:
    • per-1M-token input/output cost
    • context window and max output tokens
    • cache read/write rates and pricing tiers
    • reasoning support and modality (text / text+image)
    • same flow as /model: arrows to navigate, type to fuzzy-filter, Tab toggles all/scoped (when scoped models are configured), Enter selects, Esc cancels
  • Footer status — pricing of the currently active model in the footer (disable it by setting SHOW_STATUS = false in the source).

The current model is marked with a ✓ and sorted to the top.

model-cost picker

Install

# from npm (recommended)
pi install npm:pi-model-costs

# from the gallery or a git repo
pi install git:github.com/MaurizioFaeddaDev/model-costs

# or, to try without installing:
pi -e npm:pi-model-costs

Only interactive (tui) mode supports the custom picker. In print/RPC mode the command notifies you that it is unavailable.

Usage

/model-cost              # browse all models
/model-cost claude       # fuzzy-filter by provider/id/name
/model-cost $0.00        # fuzzy-filter by cost

/model-cost extends the built-in /model selector; the actual model switch still goes through pi's normal setModel path, so API keys are resolved the same way.

License

MIT