@ogulcancelik/pi-model-thinking
v0.1.0
Published
Auto-set thinking levels per model/provider in pi
Downloads
25
Maintainers
Readme
pi-model-thinking
Auto-set and remember thinking levels per model in pi.
No more Ctrl+P → Shift+Tab → Shift+Tab when switching models. This extension remembers what thinking level you set for each model and restores it automatically.
Install
pi install npm:@ogulcancelik/pi-model-thinkingFor local development:
pi install ~/Projects/pi-extensions/packages/pi-model-thinkingHow it works
The extension uses a single file: ~/.pi/agent/model-thinking.json.
This file is both your initial config and your live state. You can seed it manually, or let it grow organically as you use pi.
If the model is in the file
On model_select (Ctrl+P, /model, session restore), the extension automatically applies the stored thinking level.
If the model is NOT in the file
The extension does nothing. Pi handles thinking natively, exactly as before.
When you manually change thinking (Shift+Tab)
The extension writes the new level into model-thinking.json for that exact model. Next time you use that model — even in a new session — it starts with your chosen level.
If your change matches a provider-level default in the file, the exact model entry is cleaned up automatically.
Config format
~/.pi/agent/model-thinking.json:
{
"models": {
"anthropic/claude-sonnet-4-5": "high",
"openai/gpt-5.2-codex": "medium"
},
"providers": {
"fireworks": "low"
}
}Resolution order:
models["provider/modelId"]— exact matchproviders["provider"]— provider-wide fallback- Not in file → extension ignores, pi handles natively
You don't need a config file at all. Start without one, and the file will be created the first time you Shift+Tab on a model.
Commands
/model-thinking — shows current resolution and whether the active model is managed.
/model-thinking reset — deletes model-thinking.json, clearing all remembered levels.
Example flow
- Start pi with no config file. Use Claude. Thinking is handled by pi natively.
Shift+Tabchange thinking tohigh. Extension silently writes"anthropic/claude-sonnet-4-5": "high".- Quit pi, start a new session,
Ctrl+Pback to Claude. Thinking is automaticallyhigh. - Switch to GPT (not in file). Extension does nothing — pi's native default applies.
Shift+Tabon GPT tomedium. Extension adds it to the file.- Switch back to Claude →
high. Switch to GPT →medium. No manual tweaking needed.
