zeldoc-pi-provider
Zeldoc.ai model provider extension for the Pi coding agent
Package details
Install zeldoc-pi-provider from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:zeldoc-pi-provider- Package
zeldoc-pi-provider- Version
0.1.0- Published
- Sep 5, 2026
- Downloads
- 173/mo · 23/wk
- Author
- martinmose
- License
- MIT
- Types
- extension
- Size
- 30.8 KB
- Dependencies
- 0 dependencies · 2 peers
Pi manifest JSON
{
"extensions": [
"./extensions/zeldoc.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
zeldoc-pi-provider
Zeldoc.ai model provider for the Pi coding agent.
Registers zeldoc as a provider in Pi and discovers every model your Zeldoc.ai
API key can use, so you can pick ZDev or any router model from /model.
Install
pi install npm:zeldoc-pi-provider
Or straight from GitHub:
pi install https://github.com/martinmose/zeldoc-pi-provider
Authenticate
Either export your API key before starting Pi:
export ZELDOC_API_KEY=your-api-key
Or store it in Pi: start pi, run /login, pick Zeldoc.ai, and paste the key.
Don't have a key yet? See Generate an API key.
Use
Start pi, run /model, and pick a model under Zeldoc.ai. ZDev is available
immediately; the rest of your catalog appears after the first refresh (a few
seconds after startup). To make ZDev the default, add to ~/.pi/agent/settings.json:
{
"defaultProvider": "zeldoc",
"defaultModel": "zdev",
"defaultThinkingLevel": "high"
}
Thinking levels are wired up per model: ZDev exposes high and max, ZDev 2
exposes low, high, and max, and models served through the Zeldoc.ai router
(GPT, Gemini, ...) get the effort levels published on
models.dev.
Limit which models are shown
Zeldoc.ai's catalog includes image, audio, and embedding models. Those are
filtered out automatically. To narrow the list further, add substrings to match
in ~/.pi/agent/settings.json:
{
"zeldoc.models": ["zdev", "gpt-5"]
}
Only model ids containing one of the substrings are registered, so "zdev"
keeps every ZDev model. Pi's own
enabledModels setting still applies on top for Ctrl+P cycling.
How it works
- The ZDev models are registered synchronously with their known limits
(1M context, 131k output), so
pi --model zeldoc/zdevworks even before the catalog has been fetched. - On startup Pi asks the provider to refresh. The extension calls
GET /v1/modelson Zeldoc.ai, enriches the result with reasoning metadata from models.dev (cached for 7 days under~/.pi/agent/cache/), and persists the catalog in Pi's models store. Later sessions load from the store and re-fetch at most once an hour, or immediately withpi update --models. - Set
ZELDOC_PI_PROVIDER_DEBUG=1to trace refreshes on stderr.
Development
pnpm install
pnpm check # tsc --noEmit
pnpm format # biome check
pnpm format:fix # biome auto-fix
Try a local checkout without installing it:
pi --no-extensions -e ./extensions/zeldoc.ts --model zeldoc/zdev
License
MIT