Run Pi on any model
Open-source terminal coding agent with a first-class AntSeed extension.
What Pi is. Pi (@mariozechner/pi-coding-agent) is a minimal, hackable terminal coding agent by Mario Zechner - the same lineage as pi-mono. It ships with four default tools (read, write, edit, bash) and lets you extend everything else - commands, providers, themes, even the editor UI - through TypeScript extensions, skills, and prompt templates. No fork required.
What the AntSeed extension does. pi-antseed is a Pi extension that registers the local buyer proxy as a Pi provider named antseed. Once installed, every service your pinned peer advertises shows up under antseed/<id> in Pi's model picker (Ctrl+L or /model) - you switch with /model antseed/minimax-m2.7 just like any built-in.
Why an extension instead of env vars. Pi already speaks dozens of provider protocols natively. The extension calls pi.registerProvider("antseed", { api: "openai-responses", authHeader: true, baseUrl: "http://localhost:8377/v1" }) - Pi then handles auth headers, streaming, retries, and tool-calling. The Responses API path preserves reasoning items across turns for reasoning-capable models, while the extension still auto-refreshes the model list from GET /v1/models so the menu reflects what your pinned peer can serve.
Run AntSeed first
Every integration assumes a buyer proxy at http://localhost:8377. One-time setup, ~2 minutes.
Step 1
Install Pi
- Install Pi itself (the coding agent CLI)npm install -g @mariozechner/pi-coding-agent
Pi requires Node.js 20+. The binary is
pi. Verify withpi --version. Without any extensions, Pi can already talk to Claude / GPT / Gemini / Groq / etc. via API key or OAuth - the AntSeed extension below is what teaches it to route through your local buyer proxy. - Install the AntSeed extension into Pipi install git:github.com/AntSeed/pi-antseed
Pi extensions install from a git URL or a local path. Alternatives:
pi -e git:github.com/AntSeed/pi-antseedruns the extension once without installing, useful for trying it out.pi install ./pi-antseedworks from a local clone. - Reload Pi so the new provider is picked up/reload
Run this inside the Pi REPL (after typing
pito launch it). It re-scans extensions, skills, prompt templates, keybindings, and context files. A full restart works too.
Step 2
Point Pi at AntSeed
| ANTSEED_BASE_URL | http://localhost:8377/v1 |
Show as shell exports
ANTSEED_BASE_URL (default http://localhost:8377/v1) and discovers models from the pinned peer automatically. Only set ANTSEED_API_KEY if you front the buyer proxy with your own auth layer, or ANTSEED_MODELS="id1,id2" to skip discovery and register a fixed list.Step 3
Pick a model
The extension auto-discovers from GET /v1/models after Pi loads, so anything your pinned peer advertises shows up under antseed/.... After re-pinning a different peer, run /reload in Pi to refresh the model list. Route to a specific peer by prefixing the model id: /model antseed/<peerId>@minimax-m2.7.
The exact list of models depends on which peer you pin. Run antseed network browse or open the live network page to see what's available right now.
Verify
Test it
- Launch Pipi
You'll see Pi's startup header, which lists loaded extensions. Look for
antseed(orpi-antseed) in that list - if it's there, the extension loaded successfully. - Open the model picker and pick an AntSeed-routed model/model
Or press Ctrl+L. The picker is fuzzy-searchable; type "antseed" to filter. You should see entries like
antseed/minimax-m2.7,antseed/deepseek-v4-flash, etc. - one for each service your pinned peer advertises. - Or switch directly via slash command/model antseed/minimax-m2.7
Replace
minimax-m2.7with any id fromcurl http://localhost:8377/v1/models. After this, every prompt routes through AntSeed → your pinned peer → the model.
How Pi talks to AntSeed
- Wire format sent by Pi:
OpenAI Responses(hits/v1/responseson the buyer proxy) - Best-fit services: any service whose
protocolsarray containsopenai-responses. That's what the peer advertises as natively-supported - zero translation overhead, no transform edge cases. - How to check a peer: run
antseed network peer <peerId> --jsonand look atproviderServiceApiProtocols[provider].services[service]. The browse command exposes the same field per peer. - What happens when protocols don't match: AntSeed's
@antseed/api-adaptertranslates between OpenAI Responses and the service's native protocol on the fly. So a request from Pi can still reach a service that only advertisesanthropic-messages- just with a small transform step.
If it goes wrong
Troubleshooting
pi: command not foundafter installYour global npm bin is not onPATH. Runnpm prefix -gto find it, then add<that-path>/bintoPATHin your shell rc. Or use a Node version manager (nvm, fnm, volta) which handles this automatically.antseeddoesn't appear in the model picker (/modelor Ctrl+L)The extension didn't load. Re-runpi install git:github.com/AntSeed/pi-antseed, restart Pi, and watch the startup header - it lists every loaded extension and surfaces load errors there.- Picker only shows a few hard-coded
antseed/...ids, not what my peer offersPi started before the buyer proxy was up, so the extension fell back to its built-in seed list. Make sureantseed buyer startis running and a peer is pinned, then run/reloadinside Pi to refresh the model list. - Empty
/v1/modelsfrom the proxyNo peer is connected. Runantseed network browseto see options, thenantseed buyer connection set --peer <peerId>. Or launch the proxy withantseed buyer start --router <name>for automatic peer selection. - 5xx from the proxy mid-conversationUsually means the pinned peer doesn't offer the model you asked for, or has just gone offline. Re-pin via
antseed buyer connection set --peer <peerId>and/reloadin Pi. - Want to use a custom buyer proxy URL (remote host, custom port)Set
ANTSEED_BASE_URL=http://your-host:8377/v1in the shell that launchespi. The extension reads this on startup. If your proxy is fronted by auth, also setANTSEED_API_KEY=<token>.
Reference
Links
Same category