@carlosgtrz/pi-project-model

Pi extension that pins the current provider, model, and thinking level to project settings and reports local overrides on startup.

Packages

Package details

extension

Install @carlosgtrz/pi-project-model from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@carlosgtrz/pi-project-model
Package
@carlosgtrz/pi-project-model
Version
0.2.0
Published
Jul 20, 2026
Downloads
245/mo · 22/wk
Author
carlosgtrz
License
MIT
Types
extension
Size
12.1 KB
Dependencies
0 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./src/index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

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-model

Try without installing permanently:

pi -e npm:@carlosgtrz/pi-project-model

For one-off testing from this repo:

pi -e ./packages/project-model

Usage

Open Pi in the project folder, select the model/thinking level you want, then run:

/project-model save

This 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 clear

Show the current local override with:

/project-model show

Running /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-model updates 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.json when 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