omp packages

oh-my-pi-plugin-cache-miss0.1.0

Pi-compatible cache-miss notifications for Oh My Pi

pibi Published 2 months ago MIT ~17 downloads/mo

Built for omp

The author tagged this package oh-my-pi.

Did it work for you?

Result

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

Reports 0

No reports yet.

Readme

oh-my-pi-plugin-cache-miss

Keep track of your cache misses.

An Oh-My-Pi (omp.sh) extension that monitors & shows a warning when a significant prompt-cache miss causes tokens to be re-billed.

This extension only emits notifications through OMP's UI; it does not inject messages into the model context.

Repository layout

oh-my-pi-plugin-cache-miss/
├── src/index.js
├── test/index.test.mjs
├── package.json
├── README.md
├── CHANGELOG.md
└── LICENSE

The package manifest declares src/index.js as the OMP extension entry point.

Example notifications

Cache miss after model switch: 89k tokens re-billed (~$0.02) [full]
Cache miss after 23m idle: 42k tokens re-billed (~$0.06) [partial, 58k cache read]
Cache miss: 35k tokens re-billed [full]
  • full means the current request read no prompt tokens from cache.
  • partial means some prompt tokens were read from cache, but part of the prompt was re-billed.
  • Partial misses include the number of tokens read from cache.

Significance rules

A notification is emitted only when the miss is significant:

  • at least 20,000 re-billed tokens, or
  • more than $0.05 in estimated additional cost.

A 1,024-token noise floor suppresses small accounting differences. The extension preserves Pi's reason precedence: model switch, idle gap of at least five minutes, then generic miss.

Notifications are suppressed for the first request, providers that do not report cache usage, aborted or failed responses, and compaction or branch-summary boundaries.

Install

Install the published package by name:

omp plugin install oh-my-pi-plugin-cache-miss

Alternatively, install it directly from GitHub:

omp plugin install https://github.com/pibi/oh-my-pi-plugin-cache-miss.git

Development

The focused test suite has no dependencies:

npm test

License

MIT. See LICENSE.