@xynogen/pix-9router

Pi extension — 9Router provider + fetch/search tools via router API

Packages

Package details

extension

Install @xynogen/pix-9router from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@xynogen/pix-9router
Package
@xynogen/pix-9router
Version
0.2.3
Published
Jun 18, 2026
Downloads
359/mo · 243/wk
Author
xynogen
License
MIT
Types
extension
Size
56 KB
Dependencies
2 dependencies · 2 peers
Pi manifest JSON
{
  "extensions": [
    "src/index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pix-9router

Pi coding agent extension — 9Router provider + fetch, search, and transcribe tools backed by an internal OpenAI-compatible router API.

What's included

Module Type Description
provider provider Registers 9router provider with live model list from the router API
fetch tool fetch(url, format, max_characters?) — fetches web pages via exa through the router, falls back to curl
search tool search(query, search_type, max_results?) — web/news search via exa through the router, falls back to curl
transcribe tool transcribe(file, model?, language?) — speech-to-text via /audio/transcriptions endpoint (default: dg/nova-3), falls back to curl

Install

pi install npm:@xynogen/pix-9router

Environment

Variable Required Default Description
ROUTER_API_KEY Yes Bearer token for the router API
ROUTER_API_BASE No https://9router.example.com/v1 Override router base URL

Add to your ~/.zsh_local (or equivalent):

export ROUTER_API_KEY="your-key-here"
# export ROUTER_API_BASE="https://your-router.example.com/v1"  # optional

How it works

  • Provider: on load, fetches /models from the router and registers them with Pi. models.dev is used internally to fill missing context window / modality fields where the router response omits them. Model list is cached at ~/.cache/pi/9router.json (TTL 30 min).
  • fetch / search: POST to /web/fetch and /search on the router (which proxies to exa). If the router is unreachable, falls back to raw curl. Tool output is rendered dimmed so fetched web content reads like faded context rather than primary output.
  • transcribe: POST to /audio/transcriptions (Deepgram Nova 3 by default). Accepts any audio file path; falls back to curl.

Full distro

To install the complete pix suite (all packages + Pi itself):

curl -fsSL https://raw.githubusercontent.com/xynogen/pix-mono/main/scripts/install.sh | sh

License

MIT