Connect Pi
Use Node 20 or newer, an installed Pi with first-time setup complete, a workspace API key, and available RunInfra credits.on again to refresh the saved model list.
Configure manually
Load your workspace API key intoRUNINFRA_API_KEY through your secret-management workflow. Keep it in the environment that launches Pi.
Add the provider
Back up~/.pi/agent/models.json, then merge this providers.runinfra entry into it. Custom provider definitions belong in this user-level file, not a project-level models.json.
openai-completions is Pi’s name for the Chat Completions API, not the legacy /v1/completions endpoint. apiKey uses Pi’s $VARIABLE interpolation, so the key itself stays out of this file.
Use the selected model’s context window and an output budget that fits it. If you add thinking-level controls, configure a per-model thinkingLevelMap matching the model’s supported effort values; effort names are not interchangeable across models.
Select the default model
Back up~/.pi/agent/settings.json, then merge these settings:
.pi/settings.json can override these defaults after you trust the project. If you use an enabledModels filter, include runinfra/* without removing other providers you still use.
Start Pi with an explicit selection:
models.json when you open /model. A credential saved in Pi’s auth.json takes precedence over apiKey in models.json, so check it if Pi uses a different key than you expect.
Verify
Load the same workspace key intoRUNINFRA_API_KEY in your terminal. This request uses credits and reads usage.prompt_tokens_details.cached_tokens. The macOS and Linux example uses jq.
- macOS and Linux
- PowerShell
0 is valid; a successful request does not guarantee a cache hit. This tests the API, not whether Pi inherited the key environment. Restart Pi from that environment and select the model with /model.
Revert
If you used Connect:on, which may already contain RunInfra settings. If a managed file changed afterward, Connect refuses to overwrite it. Back up and review those edits before proceeding.
For manual setup, restore the previous providers.runinfra entry in models.json, or remove it if you added it for this setup. Restore defaultProvider, defaultModel, and any enabledModels filter you changed in user or project settings. If you saved a RunInfra credential in Pi, use /logout runinfra. Open /model to reload the provider list and select your previous model.
Connect’s logout removes only its saved credentials. It does not restore agent settings or revoke the workspace key. Revoke an unwanted key in the dashboard.
Related
Connect
Set up, inspect, and restore your coding agent.
Chat completions
Read the request contract and cache usage fields.
Models
Find model ids and context windows.