@hitori-chan/pi-autocompact0.2.0
Choose when pi compacts the context, per model: /autocompact 200k
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.
Reports 0
No reports yet.
Readme
@hitori-chan/pi-autocompact
Choose when pi compacts the context, per model. pi's default is the context window minus 16k: 184k on a 200k model, about 984k on 1M.
pi install npm:@hitori-chan/pi-autocompact
Usage
/autocompact status
/autocompact 200k compact this model at 200k tokens (or 60%)
/autocompact auto back to pi's default
/autocompact on|off compaction on or off
The threshold is saved as pi's own compaction.modelOverrides["provider/id"].reserveTokens, so the compaction itself is pi's. Each compaction leaves at least half the threshold free: when needed, the model's keepRecentTokens is lowered too, and a threshold too low for the system prompt and tools is refused.