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:
{
"providers": {
"anthropic": {
"baseUrl": "https://api.inert.lol",
"apiKey": "$ANTHROPIC_API_KEY"
}
}
}Then export the key the config references:
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.
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:
{
"anthropic": {
"type": "api_key",
"key": "inert_sk_..."
}
}To confirm which state you are in:
pi auth check --provider anthropic --jsonIt reports "authType":"oauth" when broken and "authType":"api_key" when correct. The plain form without --json prints ready either way.
Next steps
- HermesAnother agent harness with a custom-provider setup.