dsh-live-pricing: Peak/Off-Peak Periods and Session Cost Bar Below the DSH Input Box

Introduction

When engaging in extended conversations within DeepSeek Harness (DSH), the model’s unit price varies according to Beijing Time peak/off-peak periods: weekday daytime peak hours are charged at the original rate, while all other periods (including weekends and Chinese statutory holidays) are charged at the idle price per official rules, approximately half of the peak price. If you only look at the “current period” and mentally calculate the cost of the entire session, the error will be significant once the session spans both peak and off-peak hours. The community plugin dsh-live-pricing (maintainer: xqtx9527, category: network tools) provides a persistent information bar below the input box, displaying the current period status, the actual model id used in this session, and the session amount (RMB estimate) calculated by bucketing and accumulating usage based on the occurrence time of each request. Clicking the entire bar expands the currently active real-time unit prices. The plugin does not connect to the network, does not collect data, and does not modify model inputs; it is a read-only display.

What Is This

dsh-live-pricing is a peak/off-peak time period bar for DSH: the Host side registers a read-only session projection deepseekLivePricing, which classifies usage into peak or off-peak buckets based on event time; the browser side handles peak/off-peak determination, holiday tables, price multiplication, and UI rendering. The current npm version is 0.4.0 (MIT license). The bar displays only three elements by default, for example:

● Off-peak  deepseek-flash                        This session ¥3.04

During peak hours, the dot is amber; during off-peak hours, it is green. Click the entire bar to additionally display the currently active cache hit input / cache miss input / output unit prices, with no other explanatory text.

Core Features

Three-Element Bar

Item Description
Period status Peak / Off-peak
Model Actual model id used in this session
Session amount Cumulative session cost calculated by peak/off-peak segmented pricing (RMB)

How Session Amount Is Calculated

The amount is calculated by taking the price of the period in which each request occurred and then accumulating:

Amount = Peak bucket usage × Peak price + Off-peak bucket usage × Off-peak price
Where usage of a bucket = Cache reads × Hit price + (Uncached input + Cache writes) × Miss price + Output × Output price

Bucketing is completed on the Host side (index.js): it collapses assistant/message from the entire session log, unaffected by client window pagination. In earlier 0.1.x versions, when bucketing was done on the browser side, due to incomplete paginated nodes, it would fall back to “current period unit price × total usage”, and measured deviations could reach approximately twofold; since 0.3.0, it has been changed to Host-side projection bucketing.

The displayed value is still an estimate, not an official bill. Known sources of deviation include: the plugin displays in RMB (if the billing page settles in USD, you need to convert yourself); the caliber of cache reads/writes, reasoning tokens, failed retries, etc. may not be completely consistent with the platform; sub-agents are independent sessions and are not counted in this session. If you need to align with the official balance, the README recommends switching to community plugins dedicated to reconciliation (such as dsh-elegent-balance-tracker, dsh-billing) or the official usage page.

Peak/Off-Peak and Pricing

  • Peak: Monday to Friday (excluding Chinese statutory holidays) 09:00–12:00, 14:00–18:00 Beijing Time.
  • Off-peak: All other periods; off-peak price = peak price × 50%.
  • Weekends that are workdays due to holiday adjustments are still counted as off-peak according to weekend rules, with no separate handling needed.

Peak prices (excerpt, off-peak prices are halved):

Model Cache hit input Cache miss input Output
deepseek-flash ¥0.04 ¥2 ¥8
deepseek-v4-pro ¥0.30 ¥9 ¥27

Old model names deepseek-v4-flash, deepseek-v4-flash-vision-exp are normalized to Flash prices. Prices and HOLIDAY_RANGES, PRICE_CHECKED_AT are constants at the top of client.js; changes take effect after restarting DSH. The RMB price source is DeepSeek official “Models & Pricing”.

Holiday Table

HOLIDAY_RANGES currently covers 2026 (State Council General Office document [2025] No. 7): New Year’s Day, Spring Festival, Qingming, Labor Day, Dragon Boat Festival, Mid-Autumn Festival, National Day, and other intervals can be found in the repository README. Years not covered will not be mistakenly identified as holidays; the panel will indicate that the price table does not cover holidays beyond that.

Data Sources and Boundaries

Data Source
Current model Built-in modelSelection session projection
Period-segmented usage This plugin’s Host-side deepseekLivePricing projection
Time, peak/off-peak, holidays, unit prices Built into the plugin, pure local calculation

It does not initiate network requests, has no telemetry, does not write session logs or files, does not register tools, and does not inject prompts.

Installation and Activation

Web version:

dsh plugin --profile web add dsh-live-pricing

Desktop version:

dsh plugin --profile desktop add dsh-live-pricing

It can also be installed from Git or a local directory (replace profile as needed):

dsh plugin --profile web add git+https://github.com/xqtx9527/dsh-live-pricing.git
dsh plugin --profile web add /path/to/dsh-live-pricing

After installing DSH Desktop, you must completely quit the application (⌘Q then reopen); simply refreshing the page cannot load the Host-side injection and the plugin event channel under the desktop protocol. Uninstall:

dsh plugin --profile web remove dsh-live-pricing

The target profiles are web and desktop; the repository is developed on DSH Desktop 0.2.0-rc.2 / macOS arm64, with no build step, Node >= 20.

Typical Usage

  1. Install the plugin for the corresponding profile using the commands above; restart DSH for the desktop version.
  2. Open any DeepSeek-routed session and view the period dot, model id, and session amount below the input box.
  3. When you need to confirm the “current moment” unit prices, click the entire bar to expand the three real-time unit prices.
  4. If the session spans peak and off-peak hours, the amount should update as the Host buckets; if there is a discrepancy with the billing page, use official usage or a dedicated reconciliation plugin as the standard.

Use Cases and Notes

Suitable for quickly sensing “whether the current price is off-peak” and the approximate cost of the session during daily development and long-session debugging in DSH, avoiding mentally calculating the total cost based solely on the current period.

Before installing, please review the GitHub repository source code and MIT license yourself; the plugin runs under the current dsh process permissions, same as other DSH plugins; trust the maintainer and the code before installing.

Compatibility note: The repository README states that the 0.3.0 interface and Host projection need to be confirmed after restart in some environments; testing is logical regression (84 items) and does not constitute visual verification of the running UI.

Conclusion

dsh-live-pricing consolidates peak/off-peak rules, 2026 holidays, and the DeepSeek price table into a single read-only UI: three persistent elements, click to view unit prices, and Host-side bucketing calculates the session amount based on message timestamps. See the SkillHub plugin page for directory and installation instructions, and GitHub for source code and changelog.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye