@qmahyar/pi-9router

extensionmaintained

Connect 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-9router
downloads/mo
0
stars
1
last push
2w ago
open issues
0

Signals

license: MITtestspi manifest: missinginstall size: —deps: 0peer deps: 0

Download trend

307 downloads · last 12 weeks (weekly)

README

9Router  ×  pi

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

npm pi-package license


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

CommandRole
/9routerConnect · full/quick sync · diagnose · register chat models as provider 9router
/9router-toolsEnable tools · set default models · output folder
ToolOn by defaultDoes
nr_image_generateYesText → image file
nr_ttsYesText → speech file
nr_web_searchYesLive web search
nr_web_fetchYesURL → markdown
nr_embedNoText → 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
SetupInstall, first run, env vars
UsageMenus, tools, on/off behavior
DevLayout for contributors

Links

License

MIT