@xynogen/pix-9router
Pi extension — 9Router provider + fetch/search tools via router API
Package details
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.1- Published
- Jun 10, 2026
- Downloads
- not available
- Author
- xynogen
- License
- MIT
- Types
- extension
- Size
- 60.2 KB
- Dependencies
- 1 dependency · 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 and search 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 |
Install
pi install git:github.com/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
/modelsfrom 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 1h). - fetch / search: POST to
/web/fetchand/searchon the router (which proxies to exa). If the router is unreachable, falls back to rawcurl.
License
MIT