@carlosgtrz/pi-project-model
v0.2.0
Published
Pi extension that pins the current provider, model, and thinking level to project settings and reports local overrides on startup.
Maintainers
Readme
@carlosgtrz/pi-project-model
Pi extension that adds /project-model to save or remove project-local model defaults.
Use it when different project folders should start with different provider/model/thinking combinations.
Requires Pi 0.80.10 or newer.
Install
pi install npm:@carlosgtrz/pi-project-modelTry without installing permanently:
pi -e npm:@carlosgtrz/pi-project-modelFor one-off testing from this repo:
pi -e ./packages/project-modelUsage
Open Pi in the project folder, select the model/thinking level you want, then run:
/project-model saveThis writes the current selection to .pi/settings.json in the current folder:
{
"defaultProvider": "openai",
"defaultModel": "gpt-5.4",
"defaultThinkingLevel": "medium"
}Remove those local overrides with:
/project-model clearShow the current local override with:
/project-model showRunning /project-model with no arguments opens an interactive menu.
When Pi starts or /reload reloads the extension, it shows a notification if the current folder has a project model override in .pi/settings.json.
Aliases:
- Save:
save,set,pin - Clear:
clear,remove,unset,unpin - Show:
show,status
Notes
/project-modelupdates only the current folder's.pi/settings.json. Any other settings already in that file are preserved. Rebranded Pi distributions use their configured project directory name instead of.pi.- The command reads or changes project settings only when the current project is trusted.
- Project-local settings take precedence over
~/.pi/agent/settings.jsonwhen Pi starts in that folder. - When Pi starts in a folder with a project-local model override, Pi loads that provider/model/thinking-level combination and also persists it to the global
~/.pi/agent/settings.json. As a result, simply starting Pi in an overridden project can change your global default model/thinking settings.
License
MIT
