Off-Peak Hours: Display DeepSeek / z.ai Peak/Off-Peak Billing Status Next to Composer

Foreword

In DeepSeek Harness (DSH) web sessions, several state pills related to the current session hang below the Composer. If the model you selected goes through a “time-based pricing” route such as DeepSeek official or z.ai (GLM Coding Plan), whether the next token is charged at full peak-hour price or half off-peak price often requires checking documentation or mentally calculating against UTC windows. The community plugin Off-Peak Hours (npm package name dsh-off-peak-hours, maintained by Shadid516) adds an ambient pill next to the Composer: it answers at a glance whether it is currently “Peak or Off-peak”, and clicking it expands a schedule description in the same style as the built-in stats panel. The plugin is classified as a client-side decoration, with no configuration and no backend state; materials note that no manual code was touched during development (PS: No human touched this code). The following covers its positioning, capabilities, and installation methods; facts are based on the GitHub README.

What is this

Off-Peak Hours is a DSH bundle: when the model used in the session comes from a “time-based pricing” provider, it renders a pill below the Composer, and clicking it opens a schedule panel. It does not rewrite billing logic; it only displays based on the built-in PLANS table and the current time (including holidays and campaign periods).

Maintainer and repository: Shadid516/dsh-off-peak-hours. Community catalog page: skillhub.cn entry. License MIT; runtime requires Node >=22 (see engines in package.json).

Core Features

Pill next to the Composer

The pill sits alongside the shipped stats pill. Examples of the two states are as follows (from the README):

● Off-peak · 50% off · starts in 6h 40m
● Peak · full rate · ends in 1h 12m
State Pill display
Off-peak Green dot · Off-peak · 50% off · starts in … (countdown until the next state begins)
Peak Amber dot · Peak · full rate · ends in … (countdown until the current peak period ends)

The color is for quick judgment at a glance; the text is for use when confirmation is needed.

The countdown only indicates “how long the current state will last”, not “what it will become afterwards” on its own — the latter is clarified in the panel.

Panel opened by clicking

Interaction matches the built-in stat dialog: it portals to document.body, anchors above the trigger, and is constrained within the viewport; Escape or clicking outside the panel and trigger closes it. The pill is a button with aria-haspopup="dialog" and aria-expanded; the panel has role="dialog", with a title corresponding to the current plan.

Panel example (DeepSeek, off-peak):

DeepSeek                               Off-peak (50% off)
──────────────────────────────────────────────────────────────
Peak begins in 2h 9m, at Mon 01:00 UTC
Peak hours         01:00-04:00 and 06:00-10:00 UTC, Mon-Fri, excluding
                   Chinese public holidays.
Time               Sun 22:50 UTC · Mon 06:50 UTC+8
Holiday calendar   2025-2026
Provider           deepseek-official

Key points: the first line restates the pill’s conclusion in words; the next line describes the state about to begin (rather than letting “starts in …” carry the semantics alone). If the change is within one day, the timestamp includes the weekday; if further away, it includes the date. When a Chinese statutory holiday or vendor campaign applies, the details list lists the override entries first, e.g., Holiday and Campaign lines.

Supported billing plans

Each plan carries its own schedule; the provider selected in the current session determines which table is used. At the same moment, different plans may be peak or off-peak; the pill only reflects the one “currently in effect”.

DeepSeek

Window Rate
Mon–Fri 01:00–04:00, 06:00–10:00 UTC, excluding Chinese statutory holidays Peak (full rate)
All other times, entire weekends, statutory holidays all day Off-peak (half rate)

Weekends are always treated as off-peak, even when adjusted working days mark a weekend as a make-up workday. Holidays are determined by China Standard Time (UTC+8).

z.ai (GLM Coding Plan)

Window Rate
Mon–Fri 14:00–18:00 Singapore Time (UTC+8), i.e. 06:00–10:00 UTC Peak (full rate)
All other times (including weekends) Off-peak (half rate)

This plan does not exclude holidays: statutory holidays falling within the peak window are still charged as peak, unlike DeepSeek’s behavior; the README explains this as intentional design with test coverage.

Campaign: from 2026-09-25 to 2026-10-07 (UTC+8 calendar days, inclusive) all day priced as off-peak; during the campaign the pill carries a campaign hint, and the panel has a Campaign line. After the campaign ends, the corresponding entry must be removed from promotions, otherwise it remains in effect.

The two routes zai and zai-coding-cn in the pi-ai catalog resolve to the same schedule.

When it does not display

If the current provider is not claimed by any plan’s matches, nothing is rendered (no pill, no placeholder). Custom routes that use a vendor but the plan hasn’t extended matches will also stay hidden, to avoid guessing.

How the provider is resolved

When a session is just opened, no model may have been selected yet; the pill reads in order:

  1. Per the session’s model directory (authoritative; can override an empty session with “no model yet”, reflecting the provider to be used in the next turn).
  2. The session’s projected model selection (fallback when the directory has no result yet).

When neither can be mapped to a defined plan, the pill is not shown.

Installation and activation

The package has been published to npm: dsh-off-peak-hours. Packages declaring dsh.bundle enter the profile’s bundle layers after installation, so one command enables them.

In a shell where dsh has been added to PATH (from the README):

dsh plugin --profile web add dsh-off-peak-hours                    # from npm
dsh plugin --profile web add github:Shadid516/dsh-off-peak-hours   # latest main

Inside a DSH session:

plugin_manager install_bundle dsh-off-peak-hours

If using a local directory (absolute path required):

plugin_manager install_bundle /absolute/path/to/dsh-off-peak-hours

The README notes: this is a configuration-free, service-free, stateless client-side decoration; no additional setup is needed after installation. If the pill doesn’t appear immediately, just refresh the page.

Typical usage

  1. Install the bundle for the web profile (see the commands in the previous section).
  2. Open a session in the web UI and select a model that goes through a DeepSeek official or z.ai-related provider.
  3. Look at the pill next to the Composer: a green dot + 50% off means currently off-peak; an amber dot + full rate means peak.
  4. When you need to confirm the next switch time or the Peak hours terms, click the pill to open the panel; compare the Time row’s UTC and UTC+8 display.

When extending to other vendors, the maintainer’s documentation points to modifying the PLANS table at the top of client.js, and adding labelKey and scheduleKey in the EN / ZH dictionaries (tests require the two dictionaries to stay in sync). New plan fields include peakWindowsUtc, usesChinaHolidays, promotions, matches(provider), etc.; see the “Adding a plan” section of the README for details.

Use cases and notes

Who it’s for: developers who long-term use DeepSeek or z.ai time-based plans in DSH web and want to confirm whether they’re in a half-price window before sending requests; also suitable for those who need to cross-reference official Peak hours terms, holidays, and campaign coverage.

Classification and permissions: the plugin is a client-side bundle (dsh.client.platform: web); the logic displays the schedule on the browser side; the host-side index.js is intentionally empty.

Installing the plugin loads the bundle with the permissions of the current dsh process; before installing, you should review the source code and MIT license yourself, and only add it to the profile once you confirm it’s acceptable.

Ecosystem note: the DSH community plugin catalog (such as skillhub.cn) is an independent site, with no official affiliation with DeepSeek / High-Flyer; this article does not describe it as an official app store.

Timeliness: the holiday calendar and Campaign dates are hard-coded in the plan and promotions; when a vendor adjusts pricing or windows, you need to fork or wait for upstream to update PLANS; the plugin does not automatically fetch remote price lists.

Conclusion

Off-Peak Hours condenses “is the next token at full peak-hour rate or half off-peak rate” into a clickable pill next to the Composer, and built in the UTC windows, Chinese holidays, and known Campaign rules for DeepSeek and z.ai. Configuration-free and ready to use right after installation, it’s suitable for billing-period self-checks in DSH web sessions.

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

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

Xiaoye