@mzwing/pi-model-info

Completes third-party model metadata in Pi from the pi.dev and models.dev catalogs

Packages

Package details

extension

Install @mzwing/pi-model-info from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@mzwing/pi-model-info
Package
@mzwing/pi-model-info
Version
0.6.2
Published
Oct 18, 2026
Downloads
1,080/mo · 168/wk
Author
mzwing
License
MIT
Types
extension
Size
193.2 KB
Dependencies
1 dependency · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./dist/index.js"
  ]
}

Security note

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

README

@mzwing/pi-model-info

npm

A Pi extension that completes the metadata of third-party models — context window, max tokens, pricing, capabilities and thinking levels — from the pi.dev and models.dev catalogs, where Pi would otherwise use placeholders. It never creates providers, discovers models or writes to your files, and works alongside discovery extensions such as pi-openai-api-models-sync.

Install

pi install npm:@mzwing/pi-model-info

Usage

Nothing happens until a provider is opted in, in ~/.pi/agent/extensions/pi-model-info/config.json or .pi/extensions/pi-model-info/config.json (the project wins):

{
  "providers": { "my-relay": {} }
}

A model is matched by its alias, then its exact id, then its id with at most one prefix and one suffix rule removed. An ambiguous match changes nothing, and fields you hand-wrote in models.json always win.

/model-info summarises what was completed, /model-info <provider>/<model> shows where each field came from, and /model-info refresh re-checks the catalogs.

Configuration

Per provider, under providers:

Key Default Description
catalogProvider — Scope lookups to one catalog provider, e.g. openrouter
costMultiplier 1 Markup applied to catalog pricing
costPolicy catalog zero forces free, keep leaves pricing alone
contextWindowPolicy catalog min never raises Pi's limits, keep leaves them alone
capabilityPolicy catalog widen only adds capabilities, keep leaves them alone
useCatalogName false Rename models to their catalog names
mapThinkingLevels false Derive thinking levels from models.dev
allowDynamic false Silence the warning when a refreshing provider's list gets frozen
models — Per-model alias, override, skip, prefixes and suffixes

Rules strip an affix before matching. -free and :free are built in and set the cost to zero:

{
  "rules": [
    {
      "id": "mainfei",
      "kind": "suffix",
      "value": "-mainfei",
      "override": { "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 } }
    }
  ]
}

See the example config and the JSON Schema for every option.

License

MIT