Pi
Pi is a terminal coding agent. Add Inferray as a custom provider.
Install
npm install -g @earendil-works/pi-coding-agent
Add the provider
Export your key:
export INFERRAY_API_KEY="inferray_..."
Add the provider to ~/.pi/agent/models.json, merging it with any you already have:
{
"providers": {
"inferray": {
"baseUrl": "https://api.inferray.com/v1",
"api": "openai-completions",
"apiKey": "$INFERRAY_API_KEY",
"models": [
{ "id": "deepseek-v4-flash", "reasoning": true, "contextWindow": 1050000, "maxTokens": 32768 },
{ "id": "claude-sonnet-4-6", "reasoning": true, "contextWindow": 1000000, "maxTokens": 64000 }
]
}
}
}
Keep the $ in "$INFERRAY_API_KEY": that is what makes Pi read the variable instead of sending the literal text. Use model IDs from the catalogue, with contextWindow matching each model's context length.
Use it
pi --provider inferray --model deepseek-v4-flash
Or start pi and choose the model with /model. Pi rereads models.json when you open the picker, so edits need no restart.
Models that work well here
- Claude Opus 5.5$4 in · $20 out per 1M tokens
- Claude Sonnet 5.5$2 in · $10 out per 1M tokens
- GPT-6.1 Sol$2 in · $10 out per 1M tokens
- Gemini 4 Argon$4 in · $20 out per 1M tokens
- Kimi K3$3 in · $15 out per 1M tokens
- GLM-5.3$0.77 in · $2.42 out per 1M tokens
- Gemini 3.8 Flash$0.75 in · $3.75 out per 1M tokens
- DeepSeek V4.1 Flash$0.15 in · $0.6 out per 1M tokens
- Run it on a Token Plan$20 a month buys $60 of usage across these models, with no 5-hour windows or weekly caps.