pi-deepseek-peak
Pi extension showing DeepSeek peak hour status in the status bar
Package details
Install pi-deepseek-peak from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-deepseek-peak- Package
pi-deepseek-peak- Version
1.3.6- Published
- Sep 16, 2026
- Downloads
- 1,631/mo · 415/wk
- Author
- psychobarge
- License
- MIT
- Types
- extension
- Size
- 58.9 KB
- Dependencies
- 0 dependencies · 1 peer
Pi manifest JSON
{
"extensions": [
"./extensions"
],
"image": "./screenshot.png"
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-deepseek-peak
Pi extension that shows DeepSeek peak hours in the TUI status bar, and prices the session with the real peak/off-peak rates.

Features
- Status bar indicator: "DS Peak" or "DS Normal", with a countdown to the next price change ("DS Peak for 1h30m") — toggle via
/dsp-countdown - Auto-refresh at 30s / 1m / 5m (default 5m) via
/dsp-refresh - Real session pricing: each assistant reply's stored cost is patched at write time with the rate in effect when it completed, and
/dsp-costrecomputes the whole session (peak/off-peak split, per model) - Uses theme colors (warning for peak, success for normal)
- Thats it
Install
pi install npm:pi-deepseek-peak
Restart pi or run /reload to activate.
Usage
Once installed, the status bar shows the current DeepSeek pricing period. Peak and off-peak rules, windows, and current rates live at https://api-docs.deepseek.com/quick_start/pricing/ — in short: peak Mon–Fri 01:00–04:00 and 06:00–10:00 UTC, weekends off-peak all day, off-peak rates are half the peak ones.
Commands
/dsp-countdown # show or hide the countdown next to the dot (menu)
/dsp-refresh # pick the status refresh interval: 30s, 1m or 5m (menu)
/dsp-cost # recompute the whole session's real cost
/dsp-cost re-prices every message from its stored model and timestamp, so it is correct for sessions resumed from disk, and prints:
- current-period rates per model
Total $X (peak $A / off-peak $B)- per-model token and cost lines
- any model id without a rate entry (those keep pi's bundled cost)
/session and the footer show the stored costs, patched by this extension at write time; /dsp-cost is the only view that recomputes everything.
Settings are saved to $PI_CODING_AGENT_DIR/deepseek-peak.json (default ~/.pi/agent/deepseek-peak.json) as { "countdown": true, "refresh": 300 } and persist across restarts. Changing PI_CODING_AGENT_DIR starts from defaults at the new location.
Models
The extension resolves rates from the id the API reports (responseModel, today deepseek-flash), falling back to the requested id — so retired ids, or ids not in pi's catalogue, still price correctly. Any other id keeps pi's bundled cost.
deepseek-flash is absent from pi's built-in catalogue, but pi overlays the pi.dev catalogue ($PI_CODING_AGENT_DIR/models-store.json, refreshed every 4h), which lists it with vision — so normally nothing to do. Only an offline setup (PI_OFFLINE) needs it added by hand in $PI_CODING_AGENT_DIR/models.json; copy the entry from https://pi.dev/api/models/providers/deepseek.
Development
npm test # self-check for the peak/countdown/pricing logic
Requires Node ≥ 22.18 (built-in TypeScript type stripping; no build step).
To test a local branch, pi install /absolute/path/to/pi-deepseek-peak (it replaces the npm version), then /reload; pi install npm:pi-deepseek-peak to switch back.
Changelog
See CHANGELOG.md for version history.
License
MIT