Skip to main content

Pi Agent setup (Grok 4.5)

Pi supports custom OpenAI-compatible providers via ~/.pi/agent/models.json. Point baseUrl at the gateway to use grok-4.5.
Grok 4.5: hard max ~500k, keep practical context ≤ ~200k. Quality drops past ~200k. Set contextWindow to 200000, not 500000 by default.

1. Install and set key

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

Windows:
macOS / Linux:

Option B: Responses API

If anything breaks, fall back to openai-completions.

Option C: auth.json

Or /login and paste a key. apiKey supports $ENV, ${ENV}, and !command forms (see Pi Providers docs).

3. Launch and pick model

models.json reloads when you open /model.

Notes

  • baseUrl must include /v1
  • Auth is required: apiKey / auth.json / --api-key
  • If the server dislikes developer role:
  • Override config dir with PI_CODING_AGENT_DIR

FAQ

No arona in /model

  • Validate JSON path/syntax
  • Ensure baseUrl, api, and models[].id
  • Re-open /model to reload

Model listed but unusable / missing key

  • Export ARONA_API_KEY or set apiKey / auth.json / --api-key
  • Do not commit secrets

401 / 404

  • 401: bad or missing key
  • 404: missing /v1 on baseUrl or wrong path