pi-custom-model
Lets your agent register custom models so they work correctly. This ensures saved variants are recognized.
What it does
This tool helps Pi use custom language models that aren't included by default. It ensures special model shortcuts (like faster or cheaper ones) work correctly.
When to use it
- ✓When you use shortcuts for specific models (e.g., ':nitro' for faster).
- ✓When a model you usually use stops working with Pi.
- ✓When you want to ensure Pi always uses the exact version of a model.
Example of what to ask your AI
“Set the 'openrouter/mistralai/mistral-7b-instruct:nitro' model as my default.”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
You add the custom model's exact name to a Pi configuration file. This teaches Pi how to find and use that specific model when you call for it.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add sickn33/agentic-awesome-skills --skill pi-custom-modelOr download just the file:
curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/pi-custom-model/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
Pi custom / variant model
When to Use
Pi's saved default only loads if the exact provider/id exists in its model registry. Pi ships a static bundled list per provider — so OpenRouter routing-shortcut variants (:nitro = sort by throughput, :floor = cheapest, :exacto = quality tool-use) and any brand-new slug are NOT in it. When the default doesn't resolve, Pi silently falls through to its built-in per-provider default (for openrouter that's moonshotai/kimi-k2.6) — looking like Pi "reset" your model. Fix = register the slug as a custom model so find(provider, id) matches.
Files (global)
~/.pi/agent/settings.json—defaultProvider,defaultModel,defaultThinkingLevel~/.pi/agent/models.json— custom models, keyed by provider~/.pi/agent/auth.json— provider credentials (check the provider key exists)
Steps
- Confirm the slug is real before adding it (e.g. check the OpenRouter model/variant exists). A typo'd id also silently falls back.
- Confirm auth. The provider must have a key in
auth.json(or an env var likeOPENROUTER_API_KEY). No auth → the model is registered but unavailable → still falls back. - Add the model to
models.jsonunderproviders.<provider>.models. For a built-in provider (openrouter, anthropic, etc.) you only supply metadata —api,baseUrl, and auth are inherited from the bundled defaults. Example:
Copy{ "providers": { "openrouter": { "models": [ { "id": "z-ai/glm-5.2:nitro", "name": "Z.ai: GLM 5.2 (nitro)", "reasoning": true, "thinkingLevelMap": { "xhigh": "xhigh" }, "input": ["text"], "cost": { "input": 0.95, "output": 3, "cacheRead": 0.18, "cacheWrite": 0 }, "contextWindow": 1048576, "maxTokens": 32768, "compat": { "supportsDeveloperRole": false, "thinkingFormat": "openrouter" } } ] } } }cost/contextWindow/compatfrom the base model (the variant shares them) — find the bundled entry in<pi-pkg>/node_modules/@earendil-works/pi-ai/dist/providers/<provider>.models.js. Don't hardcode generic 128k/16k if the real model is bigger. - Set the default in
settings.json:defaultProvider+defaultModel= the exact id. LeavedefaultThinkingLevelas the user has it. - Verify:
pi --list-models | grep <id>shows it, and JSON parses. Optionally smoke-test:pi --provider <p> --model "<id>" "which model are you?".
Quirks
- Exact match only.
find()is exactprovider+id— no fuzzy/colon-stripping for the saved default path. The slug insettings.jsonandmodels.jsonmust be byte-identical. - Silent fallback. Pi prints no error when the default doesn't resolve; it just shows a different model in the footer. That's the tell.
- Don't edit
settings.jsonalone. SettingdefaultModelto an unregistered slug does nothing —models.jsonis the actual fix. enabledModels(optional) pins the model picker so Ctrl+P cycling can't drift back:"enabledModels": ["<provider>/<id>:<thinking>"].- Project override. A repo's
.pi/settings.jsonoverrides global. If a default reverts only inside one project, check that file first. - Restart Pi fully — the registry loads at startup.
Example
User request:
Register custom Pi Agent model slugs so saved OpenRouter variants resolve correctly.
Limitations
- Adapted from
davidondrej/skills; verify local paths, tools, credentials, and agent features before acting. - For commands, remote access, scheduling, browser automation, or file-changing workflows, get explicit user approval and confirm the target environment first.
FAQ
What happens if I don't use this tool?
Pi might use a different model than you expected, or a less efficient default one, without telling you.
What are 'variants' like ':nitro'?
These are special versions of a main model, optimized for something specific, like speed (nitro), cost (floor), or quality (exact).
Do I need to edit files on my computer?
Yes, this tool involves editing specific Pi configuration files on your machine to register the models.
Details
Original description by the author
Register custom Pi Agent model slugs so saved OpenRouter variants resolve correctly.
Popularity
- GitHub stars
- 48k
- Ranking position
- #3827
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
00-andruia-consultant
Helps your agent start or improve AI projects. It analyzes code, suggests tools, and creates action plans in Spanish.
sickn33/agentic-awesome-skills
007
Lets your agent perform security audits and threat modeling. It's useful for protecting projects against attacks and vulnerabilities.
sickn33/agentic-awesome-skills
10-andruia-skill-smith
Helps your agent create or improve AI tools. It defines how tools work, writes documentation, and validates the structure.
sickn33/agentic-awesome-skills
20-andruia-niche-intelligence
Lets your agent create a summary about a specific industry. It's useful for understanding the context, rules, usage patterns, and risks of a project, using reliable sources.
sickn33/agentic-awesome-skills
Similar skills
agent-architecture-audit
Makes your agent check if everything is working correctly. It finds and fixes problems in AI systems, ensuring they perform as expected.
affaan-m/ECC
agent-eval
Helps your agent compare different AI coding tools. It measures which one is faster, cheaper, and more reliable for specific tasks.
affaan-m/ECC
agent-harness-construction
Makes your agent better understand how to perform tasks. It optimizes the tools and instructions the agent uses to increase its chances of success.
affaan-m/ECC