← Catalog

@velocirouter/pi

Pi coding agent package for VelociRouter — registers the provider and its model catalog.

Package

Install

Install with PiG

pig install npm:@velocirouter/pi

Install with Pi

pi install npm:@velocirouter/pi
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "index.js"
  ]
}

README

Written by the package's publisher, shown as published in version 1.1.3 (README.md). PiG does not review it.

@velocirouter/pi

Pi package for VelociRouter. It registers VelociRouter as a provider and loads the model catalog from the API.

Requires Pi 0.86.1 or later from @earendil-works/pi-coding-agent. If you already have a supported version, install the package:

pi install npm:@velocirouter/pi

Then run /login inside pi, pick VelociRouter, and paste your rt-… key. Pi refreshes the catalog right after login, so the models show up in /model straight away.

Install or update Pi (if needed)

If Pi is not installed, or your version is below 0.86.1, install the latest version, then run the package installation command above:

npm install -g @earendil-works/pi-coding-agent@latest

Migrating from the legacy npm package

Only if you installed Pi through @mariozechner/pi-coding-agent, replace it with the current distribution using the commands below. The legacy distribution does not support this package's catalog refresh. Then run the package installation command above.

npm uninstall -g @mariozechner/pi-coding-agent
npm install -g @earendil-works/pi-coding-agent@latest

What it registers

  • Provider — velocirouter, an openai-completions endpoint.
  • Login — pi's built-in API-key login under /login.
  • Models — fetched from /v1/models and cached in pi's model store, so new models appear without upgrading this package. Image support and the reasoning-effort ladder come from the API; levels a model does not support are hidden from pi's thinking picker. The context window is the API's combined window minus the output reservation: pi compacts once accumulated tokens pass it, and those tokens are the next request's input, so the combined figure would let a long session overshoot the input ceiling.

Session costs use the billed USD total returned by VelociRouter in streaming usage.cost. Enable Cost in response for your user in VelociRouter first. This is reporting only; it does not add another charge. If the server omits cost, the default model prices remain zero. Per-category cost breakdowns are not available, and earlier turns recorded with zero cost are not updated.

The catalog is fetched when an interactive session starts, after /login, and from the /model picker. pi -p and pi --list-models read the cached copy; when the cache is empty they fetch it once with the stored key or VELOCIROUTER_API_KEY, so CI needs no interactive start.

Environment variables

VariableEffect
VELOCIROUTER_API_KEYUsed when no key was stored by /login. Set this in CI.
VELOCIROUTER_BASE_URLOverride the API host (default https://api.velocirouter.site).

Development checks

Run npm test with the Pi AI peer dependency available. To also check host module resolution and streaming through Pi's actual extension loader, run:

JITI_FS_CACHE=0 PI_TEST_INSTALL_DIR="$(npm root -g)/@earendil-works/pi-coding-agent" \
  node --test loader.test.js

The loader check uses the host Pi installation and needs no local Pi AI install. It is skipped when PI_TEST_INSTALL_DIR is unset.

Publishing

npm publish --access public