@ogulcancelik/pi-model-thinking
Auto-set thinking levels per model/provider in pi
Package details
Install @ogulcancelik/pi-model-thinking from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@ogulcancelik/pi-model-thinking- Package
@ogulcancelik/pi-model-thinking- Version
0.1.1- Published
- Aug 24, 2026
- Downloads
- 295/mo · 12/wk
- Author
- ogulcancelik
- License
- MIT
- Types
- extension
- Size
- 12.5 KB
- Dependencies
- 0 dependencies · 1 peer
Pi manifest JSON
{
"extensions": [
"./index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
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-thinking
For local development:
pi install ~/Projects/pi-extensions/packages/pi-model-thinking
How 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 must create the config file. Only models explicitly listed (exact or by provider) are managed by the extension. For unmanaged models, pi handles thinking natively and the extension does not interfere.
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
Create ~/.pi/agent/model-thinking.json with your defaults:
{
"providers": {
"anthropic": "high",
"openai-codex": "medium"
}
}
Ctrl+Pto Claude → thinking ishigh(provider default).Shift+Tabchange thinking tolow. Extension writes"anthropic/claude-sonnet-4-5": "low".- Quit pi, start a new session,
Ctrl+Pback to Claude. Thinking is automaticallylow. Shift+Tabback tohigh. Extension removes the exact-model override (matches provider default).- Switch to GPT (managed via
openai-codexprovider). Thinking ismedium. Shift+Tabon GPT tohigh. Extension writes"openai/gpt-5.2-codex": "high".- Switch back to Claude →
high. Switch to GPT →high. No manual tweaking needed.