1. Install pi
Shell
curl -fsSL https://pi.dev/install.sh | sh2. Create ~/.pi/agent/models.json
JSON
{
"providers": {
"ghc-api": {
"baseUrl": "http://127.0.0.1:8313/v1",
"api": "openai-responses",
"apiKey": "1",
"models": [{
"id": "YOUR_RESPONSES_MODEL_ID",
"reasoning": true,
"input": ["text", "image"],
"contextWindow": 128000,
"maxTokens": 16384,
"cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0}
}]
}
}
}3. Fill fields from live metadata
- Use
openai-responses,openai-completions, oranthropic-messagesaccording to the advertised endpoint. - Include
imageonly for a vision-capable model. contextWindowis total context;maxTokensis maximum output.- Cost values are display estimates; use zeros if you do not have reliable pricing metadata.
4. Map thinking levels
JSON fragment
"thinkingLevelMap": {
"off": "none",
"minimal": null,
"low": "low",
"medium": "medium",
"high": "high",
"xhigh": "xhigh",
"max": null
}A string is sent to the provider; null marks an unsupported level. The file reloads whenever you open pi's /model.
Next step
Inspect the models and endpoints available to your account before copying a model ID into client configuration.
Inspect models and parameters →