dsh-peak-badge
A floating DeepSeek peak/off-peak pricing badge for the DeepSeek Harness (DSH) web GUI. It tells you at a glance whether DeepSeek tokens are currently billed at peak or off-peak rates — based on Beijing time, with zero configuration.
🟢 Off-peak hours — light green pill: 「优惠时段 · 半价」 (off-peak, half price) 🟠 Peak hours (09:00–12:00, 14:00–18:00 Beijing time) — light orange pill: 「高峰时段 · 单价×2」 (peak, 2× price)
Why
DeepSeek introduced peak/off-peak pricing (峰谷计费) on 2026-08-17: during the peak windows 09:00–12:00 and 14:00–18:00 (Beijing time), token prices are 2× the off-peak rate. This badge keeps that status visible at all times so you can decide whether to keep chatting or defer the expensive work.
Features
- Always current — refreshes every 30 s using
Intl.DateTimeFormat('Asia/Shanghai')(no manual timezone setup). - Draggable — move it anywhere; the position is remembered in
localStorageand clamped to the viewport. - Click for details — a card shows the current Beijing time, the peak/off-peak windows, and reference prices for DeepSeek V4-Flash / V4-Pro.
- Zero host risk — pure browser plugin; the host half is a no-op.
- Complements the text-rule reminder in
AGENTS.mdfor agents working in basecamp-style repositories.
Install
dsh plugin --profile web add dsh-peak-badge
Restart dsh web, then hard-refresh the browser (Cmd+Shift+R on macOS / Ctrl+Shift+R elsewhere). The badge appears at the bottom-left by default — drag it wherever you like.
Usage
- See status: green = off-peak, orange = peak. The pill also shows the current Beijing time.
- Drag: press and hold, move, release. Position persists across refreshes.
- Details: click (without dragging) to open/close the info card.
Reference prices (effective 2026-08-17, CNY per million tokens)
| Model | Peak input / output | Off-peak input / output |
|---|---|---|
| V4-Flash | ¥3.0 / ¥9.0 | ¥1.5 / ¥4.5 |
| V4-Pro | ¥9.0 / ¥27.0 | ¥4.5 / ¥13.5 |
Cache hits are billed at half the input price. Always check the official pricing page: https://api-docs.deepseek.com/quick_start/pricing
Structure
lib/index.js— host half (no-op; browser-only plugin)lib/client.js— browser half:window.__ModuleLoader__.load()+shell.overlayslotcordis.patch.yml— bundle patch (inserts thepeak-badgerow)
Development
npm run check # syntax-check host + client
dsh plugin --profile web add "link:$PWD" # install from source
Uninstall
dsh plugin --profile web remove dsh-peak-badge
License
MIT © 2026 Sue YoungZen
No comments yet. Be the first to write one.