@qmahyar/pi-9router
extensionmaintainedConnect pi to 9Router — multi-provider chat models plus image, speech, search, and fetch tools
by — · v1.2.1 · published 2w ago
$ pi install npm:@qmahyar/pi-9routerSignals
Download trend
307 downloads · last 12 weeks (weekly)
README
@qmahyar/pi-9router
One gateway. Many providers. Full tool suite for pi.
Sync chat models from 9Router into pi, then turn on image, speech, search, and fetch tools when you need them.
Install
pi install npm:@qmahyar/pi-9router
Or from git:
pi install git:github.com/QMahyar/pi-9router
Requires a running 9Router instance (npm i -g 9router → default http://localhost:20128).
What you get
| Command | Role |
|---|---|
/9router | Connect · full/quick sync · diagnose · register chat models as provider 9router |
/9router-tools | Enable tools · set default models · output folder |
| Tool | On by default | Does |
|---|---|---|
nr_image_generate | Yes | Text → image file |
nr_tts | Yes | Text → speech file |
nr_web_search | Yes | Live web search |
nr_web_fetch | Yes | URL → markdown |
nr_embed | No | Text → embeddings |
Off tools leave the model context. Only enabled tools expose schema + usage guidelines to the agent.
Model names
Sync uses smart enrich: when a list row already has name + capabilities (common
for chat), it skips /v1/models/info. Thin rows still get a lookup so display names
are real — openrouter/openai/tts-1-hd shows as TTS-1 HD, not "Openai/Tts 1 Hd".
- Full sync — all tool catalogs + voice TTS probes
- Quick sync — chat only (keeps previous image/tts/web catalog)
- Diagnose — health, per-kind latency, sample info, voice probes
Each tool description lists available ids (and params when known). A model
argument is resolved locally first — nano-banana maps to a real id or fails with
candidates listed, instead of No credentials for provider: nano.
edge-tts / google-tts are free and absent from /v1/models/tts. Full sync
probes them and only adds live ones.
60-second start
1. 9router # start the gateway
2. /9router → Sync models (full catalog)
3. /model → provider 9router
4. /9router-tools → pick defaults
Optional: Quick sync when you only need chat models refreshed; Diagnose when something is slow or voice TTS is missing.
Pair with Exa (optional)
For dedicated Exa neural search with multi-key rotation (separate from 9Router’s web tools):
pi install npm:@qmahyar/pi-exa-search
→ @qmahyar/pi-exa-search · npm
Use one search stack at a time if you want to avoid overlapping tools.
Docs
| Doc | |
|---|---|
| Setup | Install, first run, env vars |
| Usage | Menus, tools, on/off behavior |
| Dev | Layout for contributors |
Links
License
MIT