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

In the Admin UI, select Agents. Pi is detected when ~/.pi/agent exists or the pi binary is on PATH.
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

FileRole
~/.pi/agent/models.jsonWhere Prism writes its provider blocks and model definitions.
~/.pi/agent/settings.jsonPi's own settings. Prism does not choose your default provider or model here.
~/.pi/agent/mcp.jsonRead 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

FieldSource
idThe model's route key, which Pi sends to Prism.
nameThe readable name from your catalog.
inputtext, plus image when the model reports vision support.
contextWindow / maxTokensYour configured values, defaulting to 128000 and 16384.
reasoningtrue only for models marked as reasoning models.
thinkingLevelMapBuilt 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.