Preface

DeepSeek has implemented peak and off-peak time-of-use pricing since 2026-08-17, where the off-peak price is half of the peak price. Running the same task during peak hours costs twice as much as during off-peak hours. The challenge is that when writing code, you might not remember which tier you are currently in, and the DeepSeek Harness (hereinafter DSH) web interface does not have a ready-made place to display the tier and the money spent on the current session.

DSH’s philosophy is “everything is a plugin,” and this gap in the presentation layer is perfectly suited to be filled by a plugin. The dsh-tidewatch introduced below is exactly such a badge: floating beside the input box, displaying the peak/off-peak status, countdown, and session cost.

What is it

dsh-tidewatch is maintained by KhalilYamber under the MIT License. The current version is 1.0.6, categorized as “Cost / Web UI / Observation” in package.json. One-sentence positioning: DeepSeek Peak/Off-Peak Floating Badge — a tidal card floating beside the input box, showing whether it is currently peak or off-peak, how long until the next phase, and the API cost of the current session (in RMB by default).

The compatibility statement requires dsh >=0.1.0-rc.5 and node >=20. Surfaces are host and web: the host side is responsible for statistics, and the web client is responsible for display.

Core Features

Floating Badge

In the collapsed state, read in one line: the status indicator is orange-red for peak and blue-green for off-peak:

● Peak Off-Peak 03:33 remaining · ¥0.12

Clicking to expand shows the full panel: the official peak/off-peak schedule (Beijing Time), current tier price, current session token breakdown, currency/rate settings. Clicking the “Session Cost” row further expands the breakdown by model, listing tokens and cost for each model, summing up to the total.

Position & Theme: The badge floats to the right of the input box, vertically centered with it; when the window is too narrow to fit, it automatically moves above the input box, without obscuring the input box or the official statistics bar. The color scheme follows the GUI light/dark theme (--dsw-* variables).

Billing Scope

  • Pricing is calculated based on the actual moment of each call, with no drift during peak/off-peak switching; cache hits and misses are billed separately.
  • Price unit is USD / 1M tokens, Cost = InputMiss × cacheMiss + Output × output + (CacheRead + CacheWrite) × cacheHit.
  • Calls before the peak/off-peak era (2026-08-16 16:00 UTC) are billed at the base price of that time, ensuring historical accuracy.
  • The ledger is stored in USD. When displayed, it is converted to RMB at a fixed rate of 6.82 (default, consistent with official RMB pricing standards), or can be switched to display USD directly. RMB has 2 decimal places, USD has 4.

Peak/Off-Peak Schedule (Official Basis)

Time Period (UTC) Beijing Time Tier
01:00 – 04:00 09:00 – 12:00 Peak
04:00 – 06:00 12:00 – 14:00 Off-Peak
06:00 – 10:00 14:00 – 18:00 Peak
10:00 – Next Day 01:00 18:00 – Next Day 09:00 Off-Peak

Off-peak prices are half of peak prices. The badge determines the current tier based on UTC windows (official standard), while the schedule display uses Beijing Time. There is also a weekend rule (starting 2026-08-23): Saturday/Sunday (UTC natural days) are charged at the off-peak rate all day, with no peak/off-peak switching; the next switch point is the first time entering peak on the following Monday.

Installation and Usage

Requirements: Node.js >= 20, and a version of DeepSeek Harness with the dsh plugin command. Install the plugin first, then restart the web interface:

# npm package installation (marked as "Available after release" in README)
dsh plugin --profile web add dsh-tidewatch

# Or local directory (for development and debugging)
dsh plugin --profile web add link:./dsh-tidewatch

The first line installs from the npm source; the second line connects the local directory as a link, suitable for modifying code for debugging. After installation, restart dsh web to take effect. It is worth noting that the npm install command is marked as “Available after release” in the README; it is not confirmed whether the package has been released yet. If you cannot get the package, you can first obtain the source code directory and then install from local using the link: method.

Typical Usage

  1. After restarting dsh web, the badge appears on the right side of the input box. In the collapsed state, directly read the current tier, countdown, and session cost.
  2. Click the badge to expand/collapse the details panel: schedule, current tier price, token breakdown, currency switch (¥ / $). Switching is effective immediately and remembered.
  3. Click the “Session Cost” row to expand the breakdown by model, verifying the tokens and cost for each model.

If you want to modify this code, first build it, then run the self-check:

# Syntax check + zod junction
DSH_CHECKOUT=<harness source root directory> bash scripts/build.sh

# Peak/Off-peak math and billing self-check (19 items, including double constant consistency)
node test/verify.mjs

Data Source

Model call usage block (assistant/chunk, assistant/message events)
  → lib/index.js: costUsage session projection (zod schema validation)
  → token bucket + USD cost (based on peak/off-peak tier at event moment)
  → useProjection('costUsage') (browser side)
  → lib/client.js: floating badge rendering (second-level countdown + exchange rate conversion)

The host-side lib/pricing.js is a collection of pure functions (peak/off-peak windows, isPeakHour/peakPhaseAt, price tables, costOf). The frontend only does rendering in lib/client.js. The plugin provides a projection:costUsage session projection. If you want to connect this data into your own panel, you can reuse it directly; docs/PORTING.md describes the adaptation instructions for porting to other hosts.

Applicable Scenarios and Notes

Suitable for developers using DeepSeek in the DSH web interface who care about peak/off-peak price differences and cost monitoring. A few notes:

  1. Price tables are built-in (V4-Flash / V4-Pro official prices from 2026-08-17). After the official price adjustment, you need to manually sync lib/pricing.js (billing) and the DISPLAY_PRICES constant in lib/client.js (display) in two places.
  2. Tier determination is fixed to UTC (official standard), while the schedule display uses Beijing Time (UTC+8).
  3. RMB display is the result of converting USD ledger × fixed rate 6.82. This is consistent with the official RMB pricing standard but not the real-time exchange rate.
  4. The plugin runs with the permissions of the current dsh process. You should check the source code and license (MIT) before installing.

Summary

What dsh-tidewatch does is not complicated: it puts the official peak/off-peak times, current tier, countdown, and session cost onto a card beside the input box, saving the trouble of checking the schedule and mental math. Install, restart, and look at the badge; available in three steps. Plugin page and source code:

  • Community directory (independent site, no official affiliation with DeepSeek or Moonshot AI): https://www.skillhub.cn/plugins/KhalilYamber/dsh-tidewatch
  • GitHub: https://github.com/KhalilYamber/dsh-tidewatch