omp packages

@aaronkyriesenbach/pi-frozen-defaults0.6.0

Pi extension that freezes defaultModel/defaultProvider/defaultThinkingLevel so they only change via a manual settings.json edit, never as a side effect of using pi.

aaronkyriesenbach Published 1 month ago MIT ~148 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

pi-frozen-defaults

A pi extension package that makes defaultModel, defaultProvider, and defaultThinkingLevel behave as static configuration.

Why

By default, pi writes defaultModel/defaultProvider/defaultThinkingLevel to your global settings.json every time you switch models or thinking levels (/model, Ctrl+P, /thinking), and reads them back as the starting point for future sessions. That means switching models in one project quietly changes the default for every other project.

This package freezes that persistence. With it installed:

  • Switching your model or thinking level during a session only affects that session — it never gets written back to settings.json.
  • defaultModel, defaultProvider, and defaultThinkingLevel only change when you edit settings.json yourself.
  • Everything else is unaffected: startup model resolution still reads defaultModel/defaultProvider/defaultThinkingLevel normally, and --model/--thinking CLI flags work exactly as before.

See docs/adr/0001-freeze-defaults-via-prototype-patch.md for how and why this works.

Install

pi install npm:@aaronkyriesenbach/pi-frozen-defaults

Or add it to .pi/settings.json / ~/.pi/agent/settings.json:

{
  "packages": ["npm:@aaronkyriesenbach/pi-frozen-defaults"]
}

Compatibility

This works by patching four private SettingsManager methods (setDefaultModel, setDefaultProvider, setDefaultModelAndProvider, setDefaultThinkingLevel) into no-ops at load time. It checks that all four still exist before patching and throws a loud error if pi's internals have changed in a way it can no longer safely handle — see the ADR linked above for why that's an acceptable failure mode for this package.

Development

bun install
bun run typecheck
bun run lint
bun run format:check
bun run test:coverage

License

MIT