Skip to content
inert
Sign up
Contents

Pi

This is earendil-works/pi, the Pi Agent Harness, not Inflection's Pi chatbot. Override the built-in anthropic provider and Pi talks to Inert directly.

Provider override

Edit ~/.pi/agent/models.json:

~/.pi/agent/models.json
{
  "providers": {
    "anthropic": {
      "baseUrl": "https://api.inert.lol",
      "apiKey": "$ANTHROPIC_API_KEY"
    }
  }
}

Then export the key the config references:

bash
export ANTHROPIC_API_KEY=<inert key>

Built-in Claude model IDs keep working, so no model-list changes are needed.

Credentials

Credentials can alternatively live in ~/.pi/agent/auth.json instead of the shell environment.

Warning
A stored Claude Pro or Max login outranks every other credential source, including the key you just set. Check for one before you debug anything else.

If you have a Claude Pro or Max login

A /login credential in ~/.pi/agent/auth.json outranks both models.json and ANTHROPIC_API_KEY. Pi resolves --api-key first, then auth.json, then the env var, then models.json, so it sends the OAuth bearer token to Inert and comes back with a 401 missing or malformed API key even with the Inert key set correctly.

Run /logout, or put the Inert key in auth.json instead:

~/.pi/agent/auth.json
{
  "anthropic": {
    "type": "api_key",
    "key": "inert_sk_..."
  }
}

To confirm which state you are in:

bash
pi auth check --provider anthropic --json

It reports "authType":"oauth" when broken and "authType":"api_key" when correct. The plain form without --json prints ready either way.

Next steps