pi is a terminal coding agent. It reads custom providers from ~/.pi/agent/models.json (the directory can be moved with PI_CODING_AGENT_DIR).
models.json
{
"$schema": "https://pi.dev/schemas/models.schema.json",
"providers": {
"chainless": {
"name": "Chainless",
"baseUrl": "https://chainless.one/v1",
"api": "openai-completions",
"apiKey": "$CHAINLESS_API_KEY",
"models": [
{ "id": "kimi-k3.1-pro-uncensored", "name": "Kimi K3.1 Pro Uncensored", "reasoning": true, "input": ["text", "image"], "contextWindow": 1048576, "maxTokens": 131072 },
{ "id": "glm-5.3-fast-uncensored", "name": "GLM 5.3 Fast Uncensored", "reasoning": true, "input": ["text", "image"], "contextWindow": 1048576, "maxTokens": 131072 }
]
}
}
}export CHAINLESS_API_KEY="cl-..."
pi --model chainless/kimi-k3.1-pro-uncensored/model inside pi reloads the file. The guides page generates this file with every public model and its limits, from the live model list.
Notes
apiKeyaccepts a literal key,$NAME/${NAME}, or!command.- Defaults without limits are a 128000 context and 16384 max tokens; set both.
"reasoning": truefits every current Chainless model. GLM 5.3 Uncensored is text-only: use"input": ["text"]for it.- Leave the
compatoptions unset unless you hit a verified difference. - For authorized security engagements, put the agent brief from /guides in your project's
AGENTS.md.
Sources
Checked against the official documentation on 2026-11-29. Tools change their settings often; if a field moved, the source below is the reference.