Observed since 20 Oct, 21:41 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Dynamic 9router model discovery for Pi Coding Agent
Use models exposed by a local 9router OpenAI-compatible gateway in Pi Coding Agent. The extension discovers the gateway's current model list from /v1/models, including model limits, vision support, and reasoning capability.
9router/9router-pi refresh to fetch the latest catalog without restarting Pi/9router-pi status and /9router-pi helpmodels.json entries remain usable when startup discovery is unavailable or PI_OFFLINE is sethttp://localhost:20128/v1 (or another configured URL).9router.The discovery endpoint is currently queried without authentication. The API key is used for model requests through Pi.
Add the provider credentials to ~/.pi/agent/models.json:
{
"providers": {
"9router": {
"baseUrl": "http://localhost:20128/v1",
"api": "openai-completions",
"apiKey": "$NINE_ROUTER_API_KEY"
}
}
}
Pi also supports a literal apiKey. Do not commit real keys to this repository.
Optional environment variables:
PI_9ROUTER_BASE_URL — overrides the models.json gateway URL and default.NINE_ROUTER_API_KEY — supplies the request key and overrides the models.json key when set.PI_9ROUTER_FREE_ONLY — when set (default: true), only models marked as free by the 9router gateway are exposed. Set to 0 or false to include paid models as well.From the repository root:
pi -e ./extensions/9router-pi
Or install it persistently:
pi install -l ./extensions/9router-pi
Then run /reload in Pi (or restart it).
List discovered models:
pi --list-models 9router
Select a model:
pi --provider 9router --model openrouter/stealth/ox-alpha
Refresh after changing the models enabled by 9router:
/9router-pi refresh
Use /9router-pi status to see the discovery count and last error, if any.
In the TUI, bare /9router-pi opens a read-only menu with provider status, non-secret configuration-source presence, registered model count and registry-availability count, navigation/help, and Close. The panel never refreshes the catalog, tests the gateway, logs in, selects a model, or edits environment/model-file configuration; API keys, URLs, stderr, and user emails are not displayed. Escape or Close exits the panel. Detail views show one short display segment per page (long records continue on the next page without losing text); use Previous/Next to navigate and Back to return to the sections. Non-TUI bare /9router-pi and every explicit subcommand keep their existing behavior.
cd extensions/9router-pi
npm install
npm test
The extension uses Pi's openai-completions API adapter and registers models returned by the gateway. The repository intentionally contains no API keys.
MIT — same as pi-extensions.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.2.0Registry latest | 28 Sept 2026 | 2 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 21:41 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:045f38fae6991e657df129323b14649a94ca9bdafe8220aa461759c243a4fb53