Skip to content

pi Integration ​

1. Prerequisites ​

  • Registered and obtained a platform API Key. If you are signed in, open the Integrations page, pick pi and copy the one-line command with your key and model already filled in, then run it in your terminal.
  • pi installed:
    bash
    npm i -g @mariozechner/pi-coding-agent

codesw is Bumo's open-source provider switcher. It writes straight into pi's own config file — no proxy, no middleman. Run this in your terminal (replace YOUR_API_KEY with the key from the API Keys page):

bash
npx -y @bumocc/codesw use pi bumo.ai claude-sonnet-5-5 --key YOUR_API_KEY

codesw writes ~/.pi/agent/models.json (adds a bumo.ai provider with the model list) and ~/.pi/agent/settings.json (sets it as the default provider and model) and only touches the fields it manages; the rest of your config is kept. Right after writing, it tests the connection with that key and model and tells you whether the key is invalid, the model does not exist or the balance has run out. Run npx -y @bumocc/codesw test pi any time to check again.

To switch models, replace claude-sonnet-5-5 with another model ID from the model list and run it again, or run npx -y @bumocc/codesw for the interactive mode and pick "pi" → "Bumo Router" → a model.

3. Launch ​

bash
pi

Appendix: Manual Configuration (Alternative) ​

Save this as ~/.pi/agent/models.json (merge this entry into providers if the file already exists):

json
{
  "providers": {
    "router": {
      "baseUrl": "https://router.bumo.ai/v1",
      "api": "openai-completions",
      "apiKey": "YOUR_API_KEY",
      "headers": { "X-Title": "pi coding agent" },
      "models": [{ "id": "claude-sonnet-5-5" }]
    }
  }
}

Then launch with that provider and model:

bash
pi --provider router --model claude-sonnet-5-5

Replace YOUR_API_KEY with your platform API Key.