Skip to content

v0.1.0 — initial npm-ready release

Choose a tag to compare

@ricatix ricatix released this 18 Jun 03:12

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_status LLM tool for read-only status checks
  • Dynamic 9router provider — registers via registerProvider with auto-discovery + cached models
  • models.dev enrichment with non-blocking fallback (5s timeout)
  • Dual env var support9ROUTER_* and NINE_ROUTER_* (9ROUTER_* wins)
  • Secure persistence — config and cache at ~/.pi/agent/9router-config.json with 0o600 permissions
  • Graceful startup — registers cached provider before refresh so Pi shows models on first paint

Quality

  • Strict TypeScript with ExtensionAPI typing 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-9router

See README for configuration and usage.

License

MIT © 2026 ricatix