omp packages

@velocirouter/pi1.1.1

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

lwlee2608 Published 22 days ago MIT ~700 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

@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, so open pi interactively once before using them.

Environment variables

Variable Effect
VELOCIROUTER_API_KEY Used when no key was stored by /login. Set this in CI.
VELOCIROUTER_BASE_URL Override 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