pi-zenmux
ZenMux provider extension for pi-mono
Package details
Install pi-zenmux from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-zenmux- Package
pi-zenmux- Version
0.1.2- Published
- Mar 5, 2026
- Downloads
- 37/mo · 10/wk
- Author
- dyang
- License
- MIT
- Types
- extension
- Size
- 43.2 KB
- Dependencies
- 0 dependencies · 2 peers
Pi manifest JSON
{
"extensions": [
"./index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
ZenMux Provider Extension for pi
This package adds a zenmux provider to pi using the extension API (registerProvider), as requested in badlogic/pi-mono#1811.
Features
- Registers provider name:
zenmux - Uses API key env var:
ZENMUX_API_KEY - Uses bundled model snapshot (
zenmux-models.generated.js) at runtime - Routes Anthropic models to
https://zenmux.ai/api/anthropicwithanthropic-messages - Routes non-Anthropic models to
https://zenmux.ai/api/v1withopenai-completions - Model
maxTokensis merged fromhttps://models.dev/api.jsonduring generation
Install
Local path
pi install /absolute/path/to/pi-zenmux
NPM
pi install npm:pi-zenmux
Configure
Set API key:
export ZENMUX_API_KEY="your-zenmux-key"
Or use ~/.pi/agent/auth.json:
{
"zenmux": {
"type": "api_key",
"key": "your-zenmux-key"
}
}
Use
pi --provider zenmux --model anthropic/claude-opus-4.6
You can also start pi normally and switch with /model.
Optional endpoint override
If you need to route to a different ZenMux domain:
export ZENMUX_BASE_URL="https://zenmux.ai"
The extension derives:
- OpenAI-compatible base:
${ZENMUX_BASE_URL}/api/v1 - Anthropic-compatible base:
${ZENMUX_BASE_URL}/api/anthropic
Publish
npm run generate:models
npm run check
npm login
npm publish --access public
Dev / Test
npm install
npm run generate:models
npm run typecheck
npm test