dsh-deepseek-billing-period: Display DeepSeek API billing period below the DSH input box

Introduction

The DeepSeek API divides time into peak (full price) and off-peak (half price) periods based on Beijing Time. When developers frequently send messages in DeepSeek Harness (dsh), if they are unclear about which tier they are currently in, they may inadvertently incur full-price billing during peak windows. The official pricing explanation is in the documentation, but it is not permanently visible next to the conversation interface.

Below is an introduction to the community plugin dsh-deepseek-billing-period (Maintainer: zi7tian, Category: Network Tools). It persistently displays the current billing period and a countdown to the next tier switch below the composer in the Web version of dsh, with an optional secondary confirmation before sending during peak hours. The plugin is hosted on the SkillHub Directory, and the source code is available on GitHub.

What is this

In short: A plugin for the dsh Web client that determines peak/off-peak periods based on Beijing Time and Chinese legal holiday rules, displaying the status and countdown in a “pill” format below the input box.

  • Package Name: dsh-deepseek-billing-period (npm / dsh plugin name)
  • Current Version (package.json): 1.2.1
  • License: MIT
  • Verification Environment (README): dsh 0.2.0-rc.2, Node v26

The DeepSeek Harness ecosystem adopts an “everything is a plugin” philosophy; SkillHub and others are community directories and have no official affiliation with DeepSeek or Hithink RoyalFlush.

Core Features

Period Display and Countdown

A clickable “pill” resides below the input box, refreshing in real-time; the countdown is accurate to the minute and updates every second. Typical text looks like:

● Off-Peak · Half Price · 12 hours 42 mins to Peak

Clicking the pill pops up a rule explanation card directly above it, without squeezing the input area layout (the input area dimensions remain unchanged before and after expansion). Clicking outside the card or pressing Esc closes it. The card’s visuals match the host composer’s floating layer: semi-transparent background, hairline border, soft shadow, --dsw-radius-lg rounded corners; light/dark themes adapt via the host’s --dsw-* tokens without hardcoding colors.

Billing Rules (Judgment Logic)

Judgment is always based on Beijing Time (UTC+8), regardless of the browser’s local time zone; interface text (English/Chinese) and holiday names switch according to the host language.

Period Criteria Price
Peak Beijing Time Monday to Friday 09:00–12:00, 14:00–18:00, provided the day is not a Chinese legal holiday Full Price
Off-Peak All other times, including all day on weekends and legal holidays Half of Peak Price
  • Time windows are left-closed, right-open: Peak starts at 09:00, ends at 12:00 / 18:00; 12:00–14:00 is off-peak.
  • Built-in State Council General Office annual holiday arrangements: 2025 (Guobanfa Mingdian [2024] No. 12), 2026 (Guobanfa Mingdian [2025] No. 7). Only holidays falling on weekdays are included; weekends adjusted for work (make-up workdays) are still treated as off-peak all day.
  • Years not included (e.g., 2027, where arrangements haven’t been announced yet) fall back to “judging solely by Monday to Friday,” and this is explicitly stated in the card to avoid silent misjudgment as peak.

Pre-send Confirmation during Peak Hours

During peak (full price) periods, pressing Enter or clicking send will first pop up a confirmation box (Cancel / Confirm Send), reusing the host’s Modal / Button / Checkbox (or drawing with the same tokens if unavailable).

  • Cancel (or Esc / click mask): Does not send; draft is preserved; focus returns to the input box.
  • Confirm Send: Proceeds with the host’s original sending logic.
  • “Don’t ask again” can be checked in the popup; preference is written to browser localStorage key dsh-deepseek-billing-period.prefs. To restore confirmation every time, you need to turn on the “Pre-send confirmation during peak hours” switch at the bottom of the rules card.
  • Does not intercept: Off-peak periods, / slash commands, Shift+Enter line breaks.

Installation and Activation

Prerequisite: dsh is installed and the web profile is enabled.

dsh plugin --profile web add dsh-deepseek-billing-period

Method 2: Install from GitHub

dsh plugin --profile web add github:zi7tian/dsh-deepseek-billing-period

Installation appends packages declaring a bundle to dsh.profile.bundles. Restart dsh web and refresh the page upon completion.

git clone https://github.com/zi7tian/dsh-deepseek-billing-period.git
dsh plugin --profile web add link:/path/to/dsh-deepseek-billing-period

With the link: method, you can directly modify client.js in the checkout; simply refresh the browser, no need to reinstall or restart dsh web.

Uninstallation

dsh plugin --profile web remove dsh-deepseek-billing-period

Signs of Successful Installation

Open the page in an existing session (the blank homepage has no input box, so this slot won’t render). A billing period pill appears below the input box; click it to expand the rules card. See screenshots/ in the repository for visuals (light/dark rules cards and peak confirmation popup).

Typical Usage

  1. Install and restart dsh web, then enter any session with a composer.
  2. Look at the pill text to determine if it is currently peak or off-peak, and how long until the next switch.
  3. Click the pill to view the tabular rules and holiday explanations when you need to verify details.
  4. If you wish to be reminded before every send during the full-price peak window, keep “Pre-send confirmation during peak hours” enabled; if you have checked “Don’t ask again,” simply toggle the switch back on at the bottom of the rules card.

The plugin has no additional configuration files; behavior is determined by the built-in period table and the send confirmation preferences in localStorage.

Use Cases and Notes

Who it is for: Developers who frequently call the DeepSeek API within dsh Web and want to see peak/off-peak status and countdowns alongside the interface at all times; users who care about avoiding accidental sends during full-price peak windows and need optional secondary confirmation.

How it runs: Like other dsh plugins, it loads client bundles (cordis.patch.yml) within the enabled web profile, injecting host modules like conversation / slots. Before installing, it is recommended to review the Source Repository and the MIT License to ensure it meets your security and compliance requirements; the plugin executes on both the dsh process and the browser side, with permission boundaries determined by the current dsh and browser context.

Limitations: Holiday data only covers the years listed in the README; future years require waiting for the author to update or accepting the “weekday-only window” fallback logic. Billing conclusions are for reference against official pricing documentation only; final billing is subject to DeepSeek invoices and official explanations.

Conclusion

dsh-deepseek-billing-period brings DeepSeek API peak/off-peak rules right below the composer: status, countdown, rules card, and optional peak send confirmation are all calculated based on Beijing Time and built-in holiday arrangements, fitting seamlessly with dsh Web theme tokens.

  • Directory Page: https://www.skillhub.cn/plugins/zi7tian/dsh-deepseek-billing-period
  • GitHub: https://github.com/zi7tian/dsh-deepseek-billing-period
羽毛球分组比赛记分
小程序二维码

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

Xiaoye