AGENTS.md: document the Pi models.json location and resolution rules

Note that the Pi agent reaches the fleet via ~/.pi/agent/models.json
(outside the repo), that the model ids are stable and referenced by
settings.json, and the two resolution rules (default = provider+model pair;
subagents = unique bare id). Gives the per-slot contextWindow values.
This commit is contained in:
Frank
2026-08-18 09:00:05 -07:00
parent a08be1641f
commit e5f21a5562
+24
View File
@@ -84,6 +84,30 @@ graph LR
E --> F[health check]
```
## Pi Model Config (`~/.pi/agent/models.json`)
The Pi agent reaches the fleet through `/home/dank/.pi/agent/models.json`.
This file lives outside the repository. Each provider is one host endpoint.
Each model `id` is the served alias. The two aliases are
`frank-default-small` (dankserver `:7770`) and `frank-default-large`
(dankclaw `:52625`).
The model `id` values are stable. The file
`/home/dank/.pi/agent/settings.json` references them. Two resolution rules
apply (verified in `@earendil-works/pi-coding-agent` `model-resolver.js`):
- The default model resolves as a `defaultProvider` + `defaultModel` pair.
The `defaultProvider` must name the provider that serves the `defaultModel`.
- A subagent override uses a bare model `id`. A bare `id` resolves only when
it is unique across all providers.
When you rename a service or move a model to a new host, update
`models.json`. Update the provider key, the model `id`, `contextWindow`, and
`input`. If the default model moved hosts, also update `defaultProvider` in
`settings.json`. Set `contextWindow` to the per-slot context (dankserver
`175104`, dankclaw `262144`). The full schema is in the agent knowledge base
page `~/.pi/agent/docs/pi/models.md`.
## Runtime & Troubleshooting
### FastMTP patched llama.cpp (retired, 2026-08-18)