How to use
- Copy the installation command and review the source package before installing it in your own agent environment.
- Check the source document for required tools, credentials and supported hosts.
- Describe your input and desired deliverable; review the output against the source material.
npx skills add https://github.com/legout/skills --skill pi-custom-modelBefore you start
- Installation does not include a model subscription, API allowance or permission to access your files.
- Repository stars and installation counts describe activity, not an independent quality or security test.
Rendered from the source repository. Headings, examples, code, tables, links, and referenced images are preserved.
Pi Custom Model
Adapted from David Ondrej's MIT-licensed `pi-custom-model` at commit 11dee2ebc2d045806b686ba0b57746f1e3d7e331. Current installed Pi help and documentation override this pinned workflow.This workflow edits user-level Pi configuration. Do not run it implicitly.
Preflight
Before writing anything:
- Run
pi --version,pi --help, andpi --list-models <search>. - Locate and read the installed Pi documentation for models and custom providers. Confirm the current
models.jsonschema and reload behavior. - Confirm the requested provider/model ID against the provider's current authoritative catalog. Preserve spelling, punctuation, and variant suffixes exactly.
- Determine whether the provider is built in, needs a
models.jsonentry, or requires a custom provider extension for a non-standard API. - Check only whether authentication is available through Pi's supported login or environment mechanism. Never print or copy credential values from
auth.json. - Check project settings as well as user settings when the problem occurs only in one repository.
If the installed registry already resolves the exact ID, do not add a duplicate custom model. Diagnose the selected provider, project override, or launch arguments instead.
Files
The usual user-level files are:
~/.pi/agent/models.json— custom provider/model definitions;~/.pi/agent/settings.json— default provider, model, and thinking level; and~/.pi/agent/auth.json— credentials managed by Pi; inspect presence only, not values.
Confirm these paths in the installed documentation before mutation. Back up every existing file you will change, preserve unrelated keys, and parse the result as JSON.
Register the Model
For a built-in provider, add only the provider/model metadata required by the installed schema. Custom model entries merge with built-in providers; do not copy an API key into models.json when Pi already manages that provider's authentication.
Minimal shape, subject to the installed schema:
{
"providers": {
"<provider>": {
"models": [
{
"id": "<exact-model-id>",
"name": "<display-name>"
}
]
}
}
}Add fields such as reasoning support, inputs, pricing, context window, token limit, compatibility, API, or base URL only when current provider documentation establishes their values. Do not copy stale metadata from a superficially similar model.
For a provider that is not built in, follow the installed custom-provider documentation. Use environment-variable references or Pi's supported authentication flow; never place a literal secret in a tracked project file.
Verify Before Changing Defaults
- Parse
models.jsonwith an available JSON parser. - Trigger the reload mechanism documented by the installed Pi version; current versions reload model configuration automatically when the model selector opens.
- Run
pi --list-models <exact-id-fragment>and require the intended provider/model row to appear as available. - If it does not appear, stop and fix the definition or authentication. Do not change defaults yet.
- Only after discovery succeeds, update
defaultProvideranddefaultModelinsettings.jsonwhile preserving the user's thinking level and unrelated settings. - Start or reload Pi and confirm the selected model in the UI. Run a billed smoke prompt only with the user's approval.
Report backups, changed keys, discovery output, and any unresolved provider or authentication issue. Never claim that an unavailable model was registered successfully.

