The billing policy of DeepSeek Harness (DSH) varies between peak and off-peak hours. Model calls initiated during peak hours incur additional fees. dsh-peak-guard is a host + client plugin designed to address this issue by directly short-circuiting the call flow during peak billing windows.

Core Features

  1. Peak blocking: Directly short-circuits on the llm/stream event without calling next(), so no fees are incurred.
  2. Default windows: 09:00–12:00 and 14:00–18:00 Beijing Time. Weekends and statutory holidays are off-peak.
  3. Record management: Supports searching, marking as done, clearing, and persisting to disk.
  4. UI integration: Shield toggle on the left side of the input box, and an interception list card above the input box.

Installation

Use the provided PowerShell script to install:

pwsh -File install-profile.ps1

Commands and Configuration

Commands

  • /peak enable|disable: Master switch for peak protection.
  • /peak off [minutes]: Temporarily allow calls for the specified number of minutes.
  • /peak test: Preview the interception message.
  • /peak force: Force intercept or undo it.

Configuration

  • tone: joke: Enable easter-egg phrasing (e.g., “Liang Wenfeng time”).
  • hint: false: Hide additional explanations and keep only the first sentence.
  • blockUtilityCalls: true: Intercept utility calls such as conversation title generation.

Notes

  1. DSH Desktop only; the command-line dsh plugin is not supported.
  2. After modifying the code, you must fully quit and restart DSH Desktop for changes to take effect.
  3. No automatic off-peak resending is provided; the plugin only handles interception and record keeping.

Conclusion

By directly short-circuiting model calls during peak hours, this plugin helps developers control costs while providing visual management of interception records. For the source code and directory, see: GitHub.