Coding Agents
Pi
Route Pi through the Inference.net gateway with inf pi.
inf pi routes Pi through https://api.inference.net/v1 using the openai-completions API. Pi uses two config files. Pi's own auth.json sign-in state is never touched.
Config files
inf writes fields in ~/.pi/agent/models.json and ~/.pi/agent/settings.json (JSON, two targets). inf owns fields in those files, not the whole files. auth.json is not touched so off cannot sign you out of your own Pi account.
inf pi on
inf pi on| Flag | Required | Description | Default |
|---|---|---|---|
--model <alias> | No | Default Pi model | kimi-k3-fast |
See Model mapping for supported aliases and limits.
What gets written
models.json providers.inference object:
| Path | Value |
|---|---|
name | Inference.net |
baseUrl | https://api.inference.net/v1 |
api | openai-completions |
authHeader | true |
apiKey | gateway key (secret) |
models | array of the three aliases |
settings.json:
| Path | Value |
|---|---|
defaultProvider | inference |
defaultModel | selected alias |
The glm-5.2-fast registry entry carries contextWindow 262,144 and maxTokens 128,000.
{
"providers": {
"inference": {
"name": "Inference.net",
"baseUrl": "https://api.inference.net/v1",
"api": "openai-completions",
"authHeader": true,
"apiKey": "<gateway-key>",
"models": [
{
"id": "glm-5.2-fast",
"name": "glm-5.2-fast",
"input": ["text"],
"contextWindow": 262144,
"maxTokens": 128000,
"reasoning": true
}
]
}
}
}inf pi status
inf pi statusIf one of the two config updates fails, status reports partial state.
inf pi off
inf pi offoff restores unchanged owned fields. It keeps fields that you edited after on.
Examples
Select the Fast-tier alias:
inf pi on --model glm-5.2-fastRestart Pi after on or off. See Troubleshooting for drift, recovery, and key revocation.