Pi extension providing a Neuralwatt inference API provider with energy transparency

A Pi extension that adds Neuralwatt as a model provider, giving you access to open-source models through an OpenAI-compatible API with energy transparency.
Sign up here to get an API key (referral link).
The extension uses Pi’s credential storage. Add your API key to ~/.pi/agent/auth.json (recommended):
{
"neuralwatt": { "type": "api_key", "key": "your-api-key-here" }
}
Or set environment variable:
export NEURALWATT_API_KEY="your-api-key-here"
# From npm
pi install npm:@aliou/pi-neuralwatt
# From git
pi install git:github.com/aliou/pi-neuralwatt
# Local development
pi -e ./extensions/provider/index.ts
Once installed, select neuralwatt as your provider and pick a model:
/model neuralwatt kimi-k3
Neuralwatt serves every model on two APIs. Pick one in /neuralwatt:settings → API (or set provider.api in the extension config):
openai-completions (default): the OpenAI-compatible chat/completions endpoint.anthropic-messages: the Anthropic-compatible POST /v1/messages endpoint, which streams native tool use and thinking blocks.Both use the same model ids. The setting applies on /reload. Cost, energy, and quota tracking work on both.
Check your API usage at a glance:
/neuralwatt:quota
The quota command shows three tabs:
https://github.com/user-attachments/assets/a8994940-c467-4744-a0f2-833cb63923ff
When enabled, the extension notifies you when credits or energy are running low. With an active subscription, only energy warnings fire (credits are on-demand top-up only).
Configure features with /neuralwatt:settings:
openai-completions (default) and anthropic-messages; applies on /reload/neuralwatt:quotaThe provider itself cannot be disabled — it is always loaded.
The extension ships a built-in model list, so it works offline on first start. Pi refreshes the catalog from the Neuralwatt API in the background (authenticated when an API key is configured, so key-scoped models appear too) and caches it in ~/.pi/agent/models-store.json. pi update --models forces a refresh.
git clone https://github.com/aliou/pi-neuralwatt.git
cd pi-neuralwatt
pnpm install
pnpm run typecheck
pnpm run lint
pnpm run test
pnpm run check:models # compare the built-in model list with the live API
The pre-commit hook runs typecheck, lint, the lockfile check, and the changeset check. Releases use Changesets.
~/.pi/agent/auth.json or via NEURALWATT_API_KEY)