omp packages

@mzwing/pi-model-info0.6.2

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

GitHub Actions Published 1 day ago MIT ~1.1K downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

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