← Catalog

@mzwing/pi-model-info

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

Extension

Install

Install with PiG

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

Install with Pi

pi install npm:@mzwing/pi-model-info
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./dist/index.js"
  ]
}

README

Written by the package's publisher, shown as published in version 0.7.2 (README.md). PiG does not review it.

@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:

KeyDefaultDescription
catalogProvider—Scope lookups to one catalog provider, e.g. openrouter
costMultiplier1Markup applied to catalog pricing
costPolicycatalogzero forces free, keep leaves pricing alone
contextWindowPolicycatalogmin never raises Pi's limits, keep leaves them alone
capabilityPolicycatalogwiden only adds capabilities, keep leaves them alone
useCatalogNamefalseRename models to their catalog names
mapThinkingLevelsfalseDerive thinking levels from models.dev
allowDynamicfalseSilence 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