Install
Install with PiG
pig install npm:@arhen/pi-add-9routerInstall with Pi
pi install npm:@arhen/pi-add-9routerPackages 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": [
"./src/index.ts"
]
}README
Written by the package's publisher, shown as published in version 1.0.2 (README.md). PiG does not review it.
@arhen/pi-add-9router
Install
Requires the pi coding agent — install it first: npm install -g @earendil-works/pi-coding-agent.
pi install npm:@arhen/pi-add-9router
Pi Coding Agent extension for 9router — AI routing proxy (default http://localhost:20128).
Registers 9router as a Pi provider with dynamic model discovery. Provider only, no web tools — use pi-web-access for web search/fetch.
Features
- Auto-discovers models and combos from 9router
/v1/modelson startup - Registers
9routerprovider with dynamic base URL + API key - Cached discovery (fast startup, credential-fingerprinted)
- models.dev metadata enrichment (context window, max tokens, input modalities)
- Reasoning support (
thinkingLevelMap→reasoning_effort) - Commands:
/9router-status,/9router-models,/9router-config,/9router-reasoning,/9router-reload
Environment
| Variable | Default | Description |
|---|---|---|
NINE_ROUTER_BASE_URL | http://localhost:20128 | 9router endpoint |
NINE_ROUTER_API_KEY | — | API key if 9router requires auth |
NINE_ROUTER_ENABLE_REASONING | — | 1/true to expose thinking levels |
Config persists to ~/.pi/agent/9router-config.json (or $PI_CODING_AGENT_DIR/9router-config.json), shared across Pi instances.
Commands
| Command | Purpose |
|---|---|
/9router-config | Configure base URL, API key, reasoning |
/9router-status | Connection status, model counts |
/9router-models | Browse models/combos and switch |
/9router-reasoning | Toggle thinking levels |
/9router-reload | Re-discover models |
Why not pi-9router-ext?
pi-9router-ext bundles the same provider plus web tools (ninerouter_web_search, ninerouter_web_fetch) and web-route discovery (~1.2K tokens extra in context). This package is the provider flow only — same config file format, same env vars, so they're drop-in interchangeable.
License
MIT