v0.1.0 — initial npm-ready release
Initial npm-ready release
Pi Coding Agent extension for 9router — an open-source AI routing proxy. Connect Pi to any 9router instance via its OpenAI-compatible API with dynamic model discovery, local cache, and graceful startup.
Features
- /9router command with subcommands:
status,refresh,models,setup,reasoning,clear ninerouter_statusLLM tool for read-only status checks- Dynamic 9router provider — registers via
registerProviderwith auto-discovery + cached models - models.dev enrichment with non-blocking fallback (5s timeout)
- Dual env var support —
9ROUTER_*andNINE_ROUTER_*(9ROUTER_* wins) - Secure persistence — config and cache at
~/.pi/agent/9router-config.jsonwith0o600permissions - Graceful startup — registers cached provider before refresh so Pi shows models on first paint
Quality
- Strict TypeScript with
ExtensionAPItyping from@earendil-works/pi-coding-agent - 7 unit tests, 15
expect()calls —bun test✅ bun run typecheck✅,bun run build✅- Custom error hierarchy:
NineRouterDiscoveryError,NineRouterAuthError,NineRouterValidationError,NineRouterEmptyModelsError - Secret redaction in all log/status paths
Install
pi install npm:pi-9router
# or
pi install git:github.com/ricatix/pi-9routerSee README for configuration and usage.
License
MIT © 2026 ricatix