Introduction¶
DeepSeek Harness (DSH) is an open plugin ecosystem that allows users to extend functionality according to their needs. When frequently calling large models for development or testing, it is necessary to monitor account balances in real time and understand DeepSeek’s official peak/off-peak billing rules, especially the all-day weekend off-peak rule implemented from 2026 onward. dsh-valley-meter focuses on solving this pain point. It does not rely on other plugins and directly provides balance queries and peak/off-peak timeline visualization above the input box in the DSH Web interface.
What Is This¶
dsh-valley-meter is a client-side plugin developed by user uckkk. It mounts a numeric balance badge above the input box and displays a 24-hour peak/off-peak timeline on hover, helping developers monitor cost consumption intuitively. The plugin independently queries the official balance, independently monitors real-time billing, and maintains a local ledger.
Core Features¶
Balance badge
By default, a minimal numeric balance badge is displayed in the upper-right corner of the input box, containing only the RMB symbol “¥” and the current value. The official balance is queried independently by the plugin and is automatically refreshed every 5 seconds.
One-click top-up
Clicking the “¥” symbol in the badge opens the official DeepSeek top-up page in a new tab. This entry point is designed to float on the left side of the badge, overlapping the rounded corner at the left end of the badge, for quick top-up.
Hover timeline
When the cursor hovers over the balance badge, a horizontal 24-hour timeline appears on the left side. The timeline uses two colors to distinguish time periods: peak (orange) and off-peak (blue). The top scale includes 00/06/12/18/24. A white glowing pointer indicates the current local time. If the current day is a weekend, the entire timeline is displayed in the off-peak color.
Independent Metering
The plugin runs completely independently and does not rely on other plugins.
* Today’s consumption: Monitors the llm/stream event to capture the usage of each call, converts the usage into costs based on the built-in model price table (including peak and off-peak tiers), and writes the data to the local ledger ~/.dsh/storages/valley-meter/ledger.json.
* Account balance: Queries the official DeepSeek /user/balance endpoint using the DSH credential store or the environment variable DEEPSEEK_API_KEY.
All-Day Weekend Off-Peak Pricing Rule
According to the official rules, starting from 2026-08-23 00:00, Saturday and Sunday no longer distinguish between peak and off-peak all day, and are uniformly billed at the off-peak price. The plugin determines weekends based on Beijing Time. On the corresponding day, the entire timeline is displayed in the off-peak color, and billing automatically uses the off-peak price.
Color Scheme
Built-in 10 preset stable color schemes are provided (including editor themes such as One Dark, Dracula, and Nord, as well as traditional Chinese colors and Pantone colors). Customization of peak and off-peak colors is supported through a color picker, and configuration changes take effect immediately.
Installation and Activation¶
Install using npm:
npm install dsh-valley-meter
After installation, restart the dsh web page, and the numeric balance badge will appear above the input box.
Go to Settings → Peak/Off-Peak Meter panel to adjust the color scheme, toggle the balance/cost labels, and enable or disable the all-day weekend off-peak pricing rule.
Typical Usage¶
- Open the dsh web page, and the numeric balance badge will appear above the input box.
- Hover the mouse over the balance badge to view the 24-hour peak/off-peak timeline and the current time pointer.
- Click the “¥” symbol in the badge to open the official top-up page in a new tab.
- Observe the timeline colors to determine whether the current time is peak or off-peak, or whether it is an all-day weekend off-peak period.
Notes¶
- Independent operation: The plugin independently queries and meters without relying on other plugins.
- Network permissions: The plugin requires network access to
https://api.deepseek.comfor balance queries and metering. - API Key configuration: If the API Key is not configured, the balance will display as “No data”, but today’s consumption will still accumulate normally.
- Compatibility: Requires DeepSeek Harness version
>=0.1.0-rc.5.
Summary¶
dsh-valley-meter is a simple but focused tool. Through the numeric badge and the hover timeline, it makes complex peak/off-peak billing rules and balance queries intuitive. For developers who need to finely manage usage costs, this is a practical helper plugin.
Plugin directory and source code: dsh-valley-meter