pi-sticky-model

Pi extension that keeps your selected model across /new, /resume, and /fork within the same session. Model resets on Ctrl+C.

Packages

Package details

extension

Install pi-sticky-model from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-sticky-model
Package
pi-sticky-model
Version
0.2.0
Published
Jun 7, 2026
Downloads
not available
Author
eiei114
License
MIT
Types
extension
Size
8.7 KB
Dependencies
0 dependencies · 4 peers
Pi manifest JSON
{
  "extensions": [
    "./extensions"
  ]
}

Security note

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

README

pi-sticky-model

CI Publish License: MIT Pi package Trusted Publishing

Keeps your /model selection across /new, /resume, and /fork. Resets on Ctrl+C — no settings.json override needed.

What this is

Pi extension. When you switch models with /model or Ctrl+P, the selection sticks across /new, /resume, and /fork for the lifetime of the Pi process. Close Pi (Ctrl+C) and everything resets to your settings.json default.

For anyone tired of their model snapping back to the settings.json default every time they start a new conversation.

Features

  • Sticky model: /model selection persists across /new, /resume, /fork
  • Process-scoped: model resets to settings.json default on Ctrl+C / process exit
  • Zero config: install and it works — no YAML, no JSON, no setup
  • Reload-safe: /reload preserves your current model

Coexistence

This extension works alongside other model-switching extensions such as pi-weighted-model-router and pi-scheduled-router. Since all of them call pi.setModel(), the last one to fire wins. Control the priority by ordering your packages array in .pi/settings.json.

Install

Install the published npm package with Pi:

pi install npm:pi-sticky-model

Pin a specific version when you want reproducible installs:

pi install npm:pi-sticky-model@0.1.0

Install into the current project instead of your user Pi settings:

pi install npm:pi-sticky-model -l

Or install from GitHub:

pi install git:github.com/eiei114/pi-sticky-model

Try it without permanently installing:

pi -e npm:pi-sticky-model

Quick start

Try this package locally:

pi -e .

Then run /model to pick a model, then /new — your model stays.

Package contents

Path Purpose
extensions/index.ts Pi extension entrypoint — event hooks for model persistence
lib/sticky-model.ts Process-scoped global state for the sticky model
tests/ Node test runner unit tests
docs/ Release setup (Trusted Publishing)

Development

npm install
npm run ci

Short flow:

Vault notes -> PRD -> Issues -> implement -> ci/check -> release -> save learnings

Release

This package is set up for npm Trusted Publishing, so no NPM_TOKEN is required.

npm version patch
git push

See docs/release.md for setup details.

Docs

Security

Pi packages can execute code with your local permissions. Review extensions before installing third-party packages.

For vulnerability reporting, see SECURITY.md.

Links

License

MIT\n