More Agents
Pi
Quick answer
Prism writes provider blocks into
~/.pi/agent/models.json — prism for Chat Completions models and prism-responsesfor Responses models — with each model's context window, token limits and thinking level map already filled in.Last updated Reviewed against Prism v0.3.26
One-click setup
1
Open the Agents tab
2
Click Setup
Prism creates a one-time backup and merges its providers into
models.json. Your other providers are preserved.3
Pick a Prism model in Pi
The Prism providers appear in Pi's model list. Choose your default with
/model.Two files, one job
| File | Role |
|---|---|
| ~/.pi/agent/models.json | Where Prism writes its provider blocks and model definitions. |
| ~/.pi/agent/settings.json | Pi's own settings. Prism does not choose your default provider or model here. |
| ~/.pi/agent/mcp.json | Read by the pi-mcp-adapter extension, not by Pi itself. |
Prism never sets your default model
Registering models is the whole job. Older Prism versions wrote
defaultProvider and defaultModel into settings.json; current versions clear those once and then never touch them again, because Pi persists your /model choice in the same keys.What Prism writes
{
"providers": {
"prism": {
"baseUrl": "http://127.0.0.1:11434/v1",
"api": "openai-completions",
"apiKey": "prism",
"compat": {
"supportsDeveloperRole": false,
"supportsReasoningEffort": true
},
"models": [
{
"id": "glm-5.1:cloud",
"name": "GLM 5.1 (Ollama Cloud)",
"input": ["text", "image"],
"contextWindow": 128000,
"maxTokens": 16384,
"reasoning": true,
"thinkingLevelMap": {
"off": null,
"minimal": null,
"low": "low",
"medium": "medium",
"high": "high",
"max": null
}
}
]
},
"prism-responses": {
"baseUrl": "http://127.0.0.1:11434/v1",
"api": "openai-responses",
"apiKey": "prism",
"models": []
}
}
}Model fields
| Field | Source |
|---|---|
| id | The model's route key, which Pi sends to Prism. |
| name | The readable name from your catalog. |
| input | text, plus image when the model reports vision support. |
| contextWindow / maxTokens | Your configured values, defaulting to 128000 and 16384. |
| reasoning | true only for models marked as reasoning models. |
| thinkingLevelMap | Built from the model's reasoning-effort list. off and minimal map to null because a reasoning model cannot disable thinking. |
Pi requires an explicit level map for a custom provider, which is why Prism writes one rather than relying on defaults.
Why two providers
Pi's provider format takes one protocol per provider — api has no per-model override — so Prism registers two blocks. If every model in your catalog uses Chat Completions, only prism is written, and vice versa. A provider block with no models is deleted rather than left empty.
Legacy provider cleanup
The pre-API-split
prism-codex provider is removed automatically on re-sync.MCP support needs an extension
Pi has no built-in MCP support. Prism still writes ~/.pi/agent/mcp.json — the file the pi-mcp-adapter extension reads — so the gateway entry takes effect as soon as that extension is installed. Writing it is harmless otherwise.