@nextuplodsonnpm/modelwise-pi
Automatic repository investigation with cheaper worker models for Pi
Package details
Install @nextuplodsonnpm/modelwise-pi from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@nextuplodsonnpm/modelwise-pi- Package
@nextuplodsonnpm/modelwise-pi- Version
0.1.54- Published
- Sep 19, 2026
- Downloads
- 996/mo · 996/wk
- Author
- nextuplodsonnpm
- License
- MIT
- Types
- extension
- Size
- 62.1 KB
- Dependencies
- 2 dependencies · 0 peers
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
Modelwise Pi plugin
Modelwise helps your selected Pi model focus on implementation by delegating an initial repository investigation to an eligible cheaper worker model.
The worker provides findings and relevant source locations. Your selected primary model stays in place to verify the findings, make changes, and run tests.
Installation
Requirements:
- Pi CLI with configured model-provider access.
- Node.js and npm compatible with your Pi installation.
Install the package:
pi install npm:@nextuplodsonnpm/modelwise-pi
Start Pi from your project directory. The installed extension loads automatically:
pi
Then enable Modelwise inside Pi:
/modelwise
You need an eligible worker model cheaper than your selected primary. Modelwise uses models available through your configured Pi providers.
Using Modelwise
Select your primary model and submit a repository task normally. Modelwise prepares a bounded investigation and supplies its findings to the primary automatically. You do not need to select files or invoke a worker yourself.
Your primary remains responsible for the final work. If delegation is unavailable or fails, the primary continues normally. Image-containing prompts currently bypass automatic investigation.
| Command | Purpose |
|---|---|
/modelwise or /modelwise on |
Enable automatic delegation. |
/modelwise off |
Disable delegation for subsequent tasks. |
/modelwise setup |
Optionally choose which worker models may be used. |
/modelwise status |
Show configuration and session statistics. |
/modelwise handoff |
Inspect the latest available worker handoff. |
/modelwise introvert [on|off|light|normal|aggressive|memory|forget] |
Cut input and output tokens (see below). Bare = status. |
Introvert
Runs on top of Modelwise (Modelwise must be on). It lowers cost on both sides of the primary model:
- Codebase memory — files the worker has read are summarized into
~/.modelwise/introvert/<project>.json(summary and structure only, never source). Unchanged files (matched by content hash) are served from memory instead of being re-read; changed files are re-summarized. - History compression — once conversation history passes ~8k tokens, the cheapest eligible model condenses older turns. The last 3 user turns stay verbatim and the summary is frozen so the prompt prefix stays stable.
- Terse output — a brevity rule is added to the primary's system prompt (this is what actually reduces output tokens), and a light filter strips filler openers/sign-offs from replies. Code, errors, warnings and questions are never filtered.
aggressivefalls back tonormalon complex tasks.
The status widget shows estimated tokens saved. Estimates, not billing data. The primary can still read exact code with its normal tools or modelwise_read.
Every task discovers currently available text models. Added models become eligible automatically and removed models are no longer considered. Setup saves only explicit exclusions, including exclusions for temporarily unavailable models. Older saved worker snapshots migrate to no exclusions because their omissions cannot be distinguished from models added later; reapply any intended exclusions in setup.
Routing prefers the lowest estimated cost among eligible models. Missing timing history or a missing reasoning flag does not exclude a model. Reasoning support and measured speed are only same-price preferences; capability and output quality still require verification.
Status display
MW: Number of workers | worker-model ($0.0482) vs primary-model (~$0.2554) | +81.1% est.
- The worker amount is reported usage for the latest investigation.
- The primary amount and percentage are estimates for equivalent investigation tokens.
- Green indicates a positive estimated difference on a completed investigation; red indicates a negative difference.
These figures are not total task cost or guaranteed savings. The primary's subsequent work costs extra, and provider or subscription billing may differ. Unknown costs are shown as unavailable.
Data and limitations
Your prompt and selected repository content are sent to the worker through your configured Pi provider. Its findings are supplied to the primary and may be retained in Pi's session history. Only enable delegation for content you are permitted to share with those providers.
The worker is read-only. Investigation is bounded and may miss relevant code, so the primary must verify its findings. File protections are not comprehensive secret detection. Provider limits, latency, and charges still apply.
Updating
pi update npm:@nextuplodsonnpm/modelwise-pi
Restart Pi with the extension to load the update.
License
MIT.