/model
If you want to change the active model, tell me which one to use (or I can list common options and recommend one by task).
If you meant the /model slash command behavior in pi, say that and I’ll check the exact implementation/docs in this repo.
I want to add models via my ai gateway.
https://ai-gateway.isw.la/
Key: REDACTED
Perfect — you can do this without code changes using ~/.pi/agent/models.json.
Also: since you pasted a live key here, rotate it after setup.
Use any variable name, e.g.:
~/.pi/agent/models.jsonUse the exact model IDs your gateway exposes (from its /v1/models).
/model → provider isw-gatewayIf your gateway is not fully OpenAI-compatible, add compat flags per model (e.g. maxTokensField, supportsUsageInStreaming).
If you want, I can generate a ready-to-paste models.json from the exact model IDs you have.
Go ahead. I want to use gpt-5-codex
Done.
Created:
C:\Users\Daniel.Esuga\.pi\agent\models.jsonwith provider isw-gateway and model gpt-5-codex.
Next, set your key env var (PowerShell):
Persist it for future terminals:
Then restart pi (or pi-ui server) and run /model, select:
isw-gatewayGPT-5 Codex (ISW Gateway)