tokenfactory-pi
Nebius Token Factory provider extension for pi coding agent. Requires `npm install -g @mariozechner/pi-coding-agent`. Install with `pi install npm:tokenfactory-pi`
Package details
Install tokenfactory-pi from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:tokenfactory-pi- Package
tokenfactory-pi- Version
0.2.5- Published
- Mar 3, 2026
- Downloads
- 95/mo · 23/wk
- Author
- aes0in
- License
- MIT
- Types
- extension
- Size
- 10.2 KB
- Dependencies
- 0 dependencies · 1 peer
Pi manifest JSON
{
"extensions": [
"./dist/index.js"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
tokenfactory-pi
Nebius Token Factory provider extension for pi coding agent.
Fetches the current model catalog from the Token Factory API on startup and registers all tool-capable models. No changes to pi-mono required.
Prerequisites
# Install pi coding agent globally (required)
npm install -g @mariozechner/pi-coding-agent
Installation
# Install the extension using pi's built-in package manager
pi install npm:tokenfactory-pi
Setup
# Get an API key from https://tokenfactory.nebius.com/
export NEBIUS_API_KEY=your-key-here
Usage
# List available models to verify installation
pi --list-models | grep nebius
Once running in interactive mode, use /nebius-models to list all available models.
Development
For local development:
# Build the TypeScript
npm run build
# Test locally from the project directory
cd path/to/tokenfactory-pi
pi -e . --provider nebius
How it works
On startup the extension:
- Reads
NEBIUS_API_KEYfrom environment (no-op if missing) - Fetches
GET /v1/models?verbose=truefrom the Token Factory API - Filters for models with
toolssupport and->textoutput modality - Registers them as the
nebiusprovider viapi.registerProvider()
All models use the openai-completions API with
compat: { supportsDeveloperRole: false, maxTokensField: "max_tokens" }.