Introduction¶
When developing with the DeepSeek API, billing is divided into “off-peak” and “peak” periods. If developers do not pay attention to the billing rules for the current time, they may incur unnecessary costs during peak periods. The DeepSeek Harness (DSH) Web GUI does not provide direct feedback on the current billing status by default. We need an intuitive way to confirm whether the current billing is in the “off-peak” or “peak” state to optimize cost control.
What Is This¶
dsh-plugin-offpeak-badge is a plugin designed for the DeepSeek Harness (DSH) Web GUI. It is maintained by AK-blank and aims to address the issue of users being unable to quickly confirm whether the current API billing is in the “off-peak” or “peak” state. By displaying a status badge in a prominent position in the interface, the plugin helps developers keep track of billing information at all times.
Core Features¶
- Status visualization: Displays a pill-shaped badge in the sidebar brand row, using color coding to distinguish between “off-peak” and “peak”.
- Hover details: When hovering with the mouse, it displays the billing period rules, today’s date, and the exact time of the next billing period switch.
- Collapsed mode support: After the sidebar is collapsed, the status dot is displayed on the collapse button, remaining visible.
- Accessibility support: Supports screen readers using an
aria-liveregion. - Holiday calendar: Built-in Chinese statutory holiday data (supporting 2025 and 2026) helps determine whether a date is a statutory holiday.
Installation and Activation¶
- Environment requirements: Ensure that DSH is installed and the Node.js version is 18 or higher.
- Command-line installation: Use DSH’s plugin management command to install it.
dsh plugin --profile web add github:AK-blank/dsh-plugin-offpeak-badge
- GUI installation: Open the DSH Web GUI, go to the “Plugins” page, click “Add Plugin”, paste the repository address (such as
github:AK-blank/dsh-plugin-offpeak-badge), and then click Install.
Typical Usage¶
After installation is complete, refresh the browser page. A status badge will appear in the sidebar brand row. Hover the mouse over the badge to view the current billing rules, today’s date, and the exact time of the next billing period switch. According to the rules, weekends that are designated as workdays due to holiday adjustments still belong to the weekend period and are therefore billed as off-peak.
Use Cases and Notes¶
- Use cases: Developers who frequently use the DeepSeek API during non-working hours (such as weekends or nights) and need to confirm whether they qualify for the half-price discount.
- Automatic update limitation: DSH currently does not support automatic plugin updates. To upgrade, you must first uninstall the plugin and then install it again.
- Manual installation note: Configuration lines installed manually via the
install.mjsscript do not appear in the GUI’s plugin list. - Permissions and security: The plugin runs with the permissions of the current DSH process. It is recommended to review the source code and license (MIT) before installation.
This plugin helps developers avoid extra costs caused by misjudging the billing period through intuitive visual feedback and rich information display. For more details or to provide feedback, visit its GitHub repository.