DSH HUB
HomePlugin StorePlugin PacksCommunityRankingsResourcesPublish Guide
Plugin source
Back to catalog

moon09300731 /

dsh-peak-cost-mode

Verified

DeepSeek peak-pricing cost guard for DSH: automatic caveman-style compressed output during peak hours (Beijing 09:00-12:00 / 14:00-18:00, x2) + header badge & transition toasts. DeepSeek 峰谷计价省钱插件

★ 0 Stars0 Forks0 IssuesN/A Community rating0 Confirmed installs
View on GitHub
READMESource: main@04e3def7

dsh-peak-cost-mode

DeepSeek peak-pricing cost guard for DeepSeek Harness (DSH): during DeepSeek peak-pricing hours (Beijing time 09:00–12:00 and 14:00–18:00, price ×2) the agent automatically switches to ultra-compressed caveman-style output to cut output tokens, and a header badge + toast keep you posted on every peak/valley transition.

Features

  • Automatic peak detection — Beijing time (UTC+8, no DST) is checked every 30 s against the DeepSeek V4 peak-pricing schedule:
    Window (Beijing) Tier Price
    09:00–12:00 Peak ×2
    12:00–14:00 Valley ×1
    14:00–18:00 Peak ×2
    18:00–next 09:00 Valley ×1
  • Peak-hour cost saving — while in a peak window, a "Peak Cost Mode" prompt section is injected, instructing the model to reply in ultra-compressed caveman style (drop filler/pleasantries/hedging, keep all technical content verbatim: code, commands, API names, file paths, exact error strings, numbers; safety warnings and irreversible-action confirmations are never compressed).
  • Transition reminders — toasts on every tier switch:
    • valley → peak: 「梁文锋来了,少说话多做事。」(Liang Wenfeng is here — talk less, do more.)
    • peak → valley: 「梁文谷来了,一切正常。」(back to normal)
  • Persistent status badge — right side of the session header (left of the session-log button): red 高峰 ×2 · 省流中 during peak, green 低谷 ×1 otherwise, with full details (windows / multiplier / Beijing time / next switch) on hover.

Install

dsh plugin --profile web add dsh-peak-cost-mode
# or from GitHub
dsh plugin --profile web add github:moon09300731/dsh-peak-cost-mode

Then restart dsh web and hard-refresh the browser page.

How it works

  • Host (src/index.mjs): a 30 s timer computes the Beijing wall-clock time; on entering a peak window it registers a systemPrompt section (peak-cost-mode, order 60) that makes the next and subsequent model steps reply compressed; on leaving it disposes the section. State is exposed via GET /api/peak-cost/state.
  • Client (client.js): polls /api/peak-cost/state every 30 s and renders the header badge and the transition toasts.

Note: the prompt section is registered in the host scope, so during peak hours it applies to all sessions of the deployment (that is the cost-saving point). If you want peak compression for one session only, use the dynamic-plugin variant instead.

Development

npm test   # node --check src/index.mjs && node --check client.js

License

MIT © moon09300731

DSH HUB

A community index for DSH plugins. Not an official GitHub or DeepSeek AI product.

CommunityResourcesAPIAbout
—/ 5

No ratings yet

Verified DSH bundle

Commit 04e3def74131

Community comments

No comments yet. Be the first to write one.