Preface¶
When using the DeepSeek API, switching between pricing windows (peak vs. off-peak) is easily overlooked during development. DeepSeek Harness (DSH) supports plugin extensions, and this plugin displays the current session’s pricing status directly on the Web GUI interface, helping developers make decisions based on real-time rates.
Plugin Overview¶
dsh-deepseek-offpeak-indicator is a plugin maintained by cumthugo. It reflects whether the current time falls within DeepSeek’s pricing window through a simple visual element, occupying minimal space.
Core Features¶
The plugin renders a dot in the conversation input line, displaying only when the session’s model provider is DeepSeek:
- Visual Feedback:
- Displays a 5px dot to the left of the model name.
- Yellow: Peak hours (standard rates).
- Green: Off-peak hours (half price). - Time Rules:
- Determined based on Beijing Time (Asia/Shanghai).
- Peak: Monday to Friday 09:00-12:00, 14:00-18:00 (excluding statutory holidays).
- Off-peak: All day on weekends and statutory holidays. - Holiday Handling:
- Supports local cache, network requests, or built-in tables.
- Uses a built-in 2026 holiday table (33 days) in fully offline mode.
Installation and Activation¶
The plugin takes effect immediately after installation without needing a page refresh.
Command Line Installation¶
Use the DSH plugin manager to execute the following command:
plugin_manager action=install_bundle target=github:cumthugo/dsh-deepseek-offpeak-indicator
GUI Installation¶
- Open the Plugins page in the DSH sidebar.
- Click Add plugin.
- Paste the repository address:
https://github.com/cumthugo/dsh-deepseek-offpeak-indicator
The shorthand github:cumthugo/dsh-deepseek-offpeak-indicator is also valid.
4. The status is ready when it displays application: applied.
Notes¶
- Runtime Environment: Requires a valid DSH configuration file (Desktop app or
dsh web). - Provider Determination: The plugin relies on the “provider” rather than the “model name”. Third-party gateways (such as OpenAI-compatible proxies) will not display the indicator.
- Update Limitations: Re-installing from the same source will not take effect; you must uninstall it first before reinstalling.
- Offline Mode: In fully offline scenarios, it relies solely on the built-in holiday table.
Customization¶
The plugin logic is centralized at the top of the client.js file, where you can modify the following variables:
- PEAK_WINDOWS: Peak time window configuration.
- PEAK_COLOR / OFFPEAK_COLOR: Color definitions.
- DOT_SIZE: Dot size (default 5).
- isDeepSeekProvider(): Defines which providers count as DeepSeek.
References¶
- Repository: https://github.com/cumthugo/dsh-deepseek-offpeak-indicator
- License: MIT