@lazykern/pi-persist-model
Persist model & reasoning settings per session, workspace, or globally
Package details
Install @lazykern/pi-persist-model from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@lazykern/pi-persist-model- Package
@lazykern/pi-persist-model- Version
0.5.0- Published
- May 21, 2026
- Downloads
- not available
- Author
- lazykern
- License
- MIT
- Types
- extension
- Size
- 315.4 KB
- Dependencies
- 1 dependency · 1 peer
Pi manifest JSON
{
"extensions": [
"./src/index.ts"
],
"image": "https://raw.githubusercontent.com/lazykern/pi-persist-model/main/screenshot.png"
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
Persist Model
Persist Model is a Pi extension for controlling how model and reasoning-level settings are applied.
Use it to keep changes temporary for the current session, save them for a specific workspace, or apply them globally.

pi install npm:pi-persist-model
/persist-model ← opens TUI
The problem
Pi stores model and reasoning defaults in ~/.pi/agent/settings.json. Every time you switch model or reasoning level, Pi writes those changes to the global config — so a quick "let me try GPT-5 for this one question" silently becomes the default for every future session and every project.
Persist Model intercepts those changes and keeps them scoped to your chosen policy: session-only, per-workspace, or global.
No project .pi/ folders. All state in ~/.pi/persist-model/config.json.
Scopes
| Scope | Effect |
|---|---|
session |
Changes last only this session |
workspace |
Saved per project under ~/.pi/persist-model |
pi default |
Let Pi handle it normally |
user default |
Workspace follows User default |
TUI
| Key | Action |
|---|---|
↑/↓ |
Select scope row |
←/→ |
Change scope value |
ctrl+s |
Save & apply |
esc |
Close |
License
MIT