Introduction¶
When using the DeepSeek API, billing periods matter a lot for cost control. The official pricing rules designate weekdays 09:00–12:00 and 14:00–18:00 as peak hours. If developers frequently call the API during these windows, it’s easy to overlook the pricing differences. DeepSeek Harness (DSH) is a plugin-based agent development platform, and this article introduces a plugin that displays whether you’re currently in a peak pricing window.
What It Is¶
dsh-liangtime (display name: Liang Chen) is a plugin for DeepSeek Harness, maintained by ZJ-Dragon, version 2.2.0, categorized under “Model Inference.” Its core purpose is to display above the sidebar username button or to the right of the conversation title bar whether the current time falls within the DeepSeek API’s peak pricing window, helping developers intuitively understand the billing status.
Core Features¶
1. Billing Period Indicator¶
The plugin displays a badge at the designated position to indicate whether it’s currently peak or off-peak:
- Peak: an upward zigzag arrow
- Off-peak: a downward zigzag arrow
- The arrow has no background; the icon matches the text color
By default, peak is shown in green and off-peak in red, with the labels “Liang Wenfeng Time” and “Liang Wengu Time” respectively.
2. Countdown on Hover¶
Hovering the mouse for approximately 0.5 seconds (to prevent accidental triggers) or focusing via keyboard expands the countdown, showing “xx hours xx minutes until Liang Wenfeng Time / Liang Wengu Time.” The color follows the current peak/off-peak color scheme. The width adapts to the text; if the sidebar is too narrow, it wraps to a new line and retracts on mouse-out.
3. Color & Text Configuration¶
Supported colors include black, white, green, red, yellow, blue, purple, and orange. A custom color can also be picked via the system color picker. When black or white is selected, a “Follow app theme (auto-switch)” toggle appears, enabled by default.
4. Display Position Selection¶
You can choose the display location in settings: above the sidebar username button, or to the right of the conversation title bar.
5. 24-Hour Timeline Dashboard¶
The “Liang Chen” section in the settings page provides a 24-hour timeline dashboard, showing the full-day peak/off-peak distribution.
6. Official Sync Status¶
On each launch, the plugin silently calls scripts/fetch_pricing.py in the background to sync peak/off-peak hours. On failure, a gray-text notice appears in the settings page, with an option to retry manually.
7. Statutory Holiday Sync¶
The plugin searches the Chinese government website (www.gov.cn) for the current year’s and the latest year’s holiday notices, fetches the notice page, and parses the holiday dates. Statutory holidays are treated as off-peak for the entire day.
8. Manual Holiday Calendar¶
If automatic sync fails, or for users outside China, a manual mode is available: mark days individually, or keep auto mode and add manual dates as supplements.
9. Custom SVG Icons¶
Supports importing custom SVG icons for peak and off-peak states respectively. A specification confirmation dialog appears before import, after which the system file picker is invoked. Custom SVG icons are rendered in their own file colors; text color still follows the settings.
10. Sidebar Width Sync¶
On launch, the sidebar width is read once, then re-read every 30 minutes to adjust text display width. Can be disabled in settings.
11. Adaptive Line Wrapping¶
Estimates the last-line length after wrapping; if only 1–2 characters remain, it breaks the line 2 characters earlier on the previous line. If the wrap falls within the countdown’s time portion, it breaks after “until” so the time appears on its own line. Can be disabled in settings.
Installation & Activation¶
In DeepSeek Harness, install by adding the repository via the plugin manager:
dsh plugin add github:ZJ-Dragon/dsh-liangtime
After installation, the plugin loads automatically with DSH at startup.
Typical Usage¶
-
After installation, you’ll see the billing period badge above the sidebar username button or to the right of the conversation title bar.
-
Hover or focus the badge to see the countdown to the next peak/off-peak transition.
-
Go to the “Liang Chen” section in settings to adjust colors, text, display position, sidebar width sync, adaptive wrapping, and other options.
-
Check the timeline dashboard for the full-day peak/off-peak distribution, or mark holidays manually.
-
To use custom icons, import a specification-compliant SVG file from the settings.
Use Cases & Notes¶
-
Ideal for developers who need to frequently monitor DeepSeek API billing periods, especially during batch calls or long-running tasks.
-
The plugin silently calls a Python script in the background on each launch to sync data. Python 3 (
python3orpython) must be installed on the system, otherwise sync will fail. -
The plugin does not read conversation content, does not call models, does not send telemetry — it only displays status and countdown.
-
The plugin runs with the current dsh process permissions. Review the source code and license (MIT) before installing.
-
Holiday data is sourced from Chinese government website holiday notices and applies only to Chinese statutory holidays.
Conclusion¶
dsh-liangtime helps developers avoid unexpectedly higher costs during peak hours by displaying the billing period directly in the DSH sidebar and conversation title bar. Combined with the countdown, timeline dashboard, and holiday sync, it enables more precise control over API calling costs.
- Plugin directory page: https://www.skillhub.cn/plugins/ZJ-Dragon/dsh-liangtime
- GitHub repository: https://github.com/ZJ-Dragon/dsh-liangtime