Before you begin
Create a key on the API Keys page, confirm the model ID on the Models page, and export the key in the shell where you start Pi.~/.pi/agent/models.json.
~/.pi/agent/models.json
/model inside Pi to switch between the
configured models.
models.json. Check the
Models console page and add contextWindow and
maxTokens to each entry when you need Pi’s context meter and compaction behavior to match the
selected model exactly.
This connection uses Pi’s OpenAI Chat Completions implementation. Provider-specific reasoning
controls require additional Pi compatibility settings and are not enabled by this minimal
configuration.
Troubleshooting
Issues common to every agent are listed under Common issues.