zeldoc-pi-provider0.1.1
Zeldoc.ai model provider extension for the Pi coding agent
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.
Reports 0
No reports yet.
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 and ZDev 2 expose 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