DSH Plugins Marketplace

DSH Plugins

Plugins

/

Tools & Capabilities

/

dsh-plugin-deepseek-peak-hours

d

dsh-plugin-deepseek-peak-hours

Manifest valid

A composer badge that shows whether DeepSeek API usage bills at the peak or off-peak rate right now, and on click the price table for that window: input cache hit, input cache miss and output, in CNY

UI (client)hasBundlePatch

DeepSeek peak hours · DSH plugin

npm version npm downloads license GitHub stars CI

English · 简体中文

A lightweight DeepSeek Harness (DSH) plugin that shows whether DeepSeek API usage is billing at the peak or off-peak rate right now, next to the composer's context meter. Clicking the badge opens the FLASH / PRO price table for that window.

Peak 09:00 - 12:00     ← click for the price table

What it does

WhereAppears whenExact position
conversation.composer.dockA session with a conversation (composer docked at the bottom)In the statistics row under the composer card, immediately right of the built-in Context used x% reading
conversation.hero.optionsThe New Session home (a blank session)Right-hand side of the options row above the composer card, beside the workspace and preset controls
  • Reading: Peak 09:00 - 12:00 during a peak window, Off-peak 18:00 - 24:00 otherwise. Overnight and whole-day windows read their real range: 00:00 - 09:00, 18:00 - 24:00, 00:00 - 24:00.
  • Click: a table for the running window — rows Input, 1M tokens (cache hit) / Input, 1M tokens (cache miss) / Output, 1M tokens, columns FLASH (CNY) and PRO (CNY), plus the note that off-peak rates are half the peak rates.
  • State dot: amber for peak, green for off-peak, from DSH's --dsw-alias-state-warn-primary and --dsw-alias-state-success-primary tokens.

Screenshots

The interface is shown in Chinese; the same layouts appear in every locale.

New Session — the badge rides the options row right of the workspace and preset chips, matching their 28px chip height. Peak on the left, off-peak on the right.

New Session with the peak badge New Session with the off-peak badge

An existing session — the badge is the last reading in the statistics row under the composer, immediately right of the context meter, and keeps that row's 22px height.

Composer statistics row with the peak badge Composer statistics row with the off-peak badge

Click for prices — the popover lists the FLASH and PRO price of the running window, with the note that off-peak rates are half the peak rates.

Peak price table Off-peak price table

Schedule and prices (official, not invented)

The schedule is quoted from DeepSeek's official pricing page:

Off-peak rates are half of the peak rates. Beijing time, Monday to Friday (excluding Chinese statutory holidays) 09:00 - 12:00 and 14:00 - 18:00 are peak hours; all other times, including weekends and Chinese statutory holidays all day, are off-peak.

Prices in CNY per million tokens, matching the official page on 2026-11-16:

FLASH peakFLASH off-peakPRO peakPRO off-peak
Input (cache hit)0.040.020.300.15
Input (cache miss)2.001.009.004.50
Output8.004.0027.0013.50

Background: time-of-day pricing started on 2026-08-17, weekends became off-peak all day on 2026-08-23, and the FLASH series switched to the prices above at 12:00 Beijing time on 2026-09-10. When DeepSeek changes prices, update the plugin (see below).

Install

In DSH open Plugins → Add plugin and enter the npm package name:

dsh-plugin-deepseek-peak-hours

Or point it at this repository's directory for local development. The plugin is active for the whole profile and survives a restart. Refresh the page after installing.

Design and performance

  • One timer, no polling: it wakes at the next window boundary only — 00:00, 09:00, 12:00, 14:00 and 18:00 Beijing time, at most five times a day. Coming back to a background tab, or waking a laptop, recomputes from the current clock.
  • No network calls: the schedule, the holiday calendar, and the price table all ship in the bundle.
  • No dependencies: it uses only the browser module table's react / react-dom, and never imports @deepseek-ai/dsh-client-ui-primitives or other DSH Client packages that change without notice.
  • Row-native geometry: 22px tall in the composer statistics row, exactly like the context meter and the stat pills; 28px with secondary ink in the New Session row, matching the workspace, preset and worktree chips beside it.
  • Native styling: every color, radius, shadow and font size comes from --dsw-* / --dsh-* theme tokens, so light and dark themes both match; the popover copies the built-in statistics dialog (12px padding, --dsw-radius-lg, elevation-prominent, z-index 1100, Escape and outside-click dismissal).
  • Beijing time only: the billing rule is defined in Beijing time, so the badge always computes in Asia/Shanghai regardless of the machine's zone (the test suite also passes under TZ=America/New_York).
  • Clean teardown: styles render as a React element and disappear on unmount; the timer and listeners are released in effect cleanups.

Known limitations

  • No badge on a session-less cold start: on a home with no session at all DSH opens no slot under the composer, and no plugin seat exists there. The badge appears as soon as a session is selected or created — the same visibility the built-in context meter has.
  • Holiday data covers 2026–2027: a later year falls back to the plain weekday rule (weekends still correct). Append the new State Council ranges to HOLIDAY_RANGES in client.js and publish a release when the notice appears.
  • Prices are a static snapshot: update PRICES in client.js when DeepSeek changes its price list; the plugin does not scrape the web.

Development

npm test        # schedule, holidays, boundaries, slots and dictionary wiring
npm run test:tz # the same suite under a non-Beijing machine zone

Files:

client.js            # everything: schedule + badge + price popover (no build step)
index.js             # Host half; registers nothing
cordis.patch.yml     # inserts the deepseek-peak-hours row
locale/{zh,en}.json  # Plugin Manager title and description
icon.svg             # 36×36 plugin icon (clock plus the peak wedge)
assets/icon-180.png  # 180×180 storefront tile
test/                # node --test suites

The schedule lives between /* #region schedule */ markers, and the tests evaluate that block straight out of client.js, so there is exactly one implementation.

License

MIT

Comments

Loading…

Similar plugins

dsh-deepseek-usage

by dougen

Shows a card in the sidebar footer with the DeepSeek account balance (read from the official /user/balance endpoint with the API key DSH already stores) and the unit prices of the active model — input

Tools & CapabilitiesDevelopment & InfrastructureManifest valid

★ 10

↓ 7.1k/wk

NOASSERTION

JavaScript

Nov 18, 2026

dsh plugin --profile web add @dougen/dsh-deepseek-usage

by Hao0311

Peak/off-peak pricing badge in the composer: shows the DeepSeek API peak and off-peak windows with a countdown in the tooltip, and only appears while the session model is a DeepSeek route.

Tools & CapabilitiesManifest valid

★ 0

JavaScript

Nov 10, 2026

dsh plugin --profile web add dsh-price-badge

by AK-blank

Unofficial DSH (DeepSeek Harness) Web GUI plugin: shows whether the DeepSeek API is billing at the off-peak or peak rate right now — bilingual 空闲/高峰 · Idle/Peak, Chinese holiday calendar built in.

UI & ExperienceDevelopment & InfrastructureTerminal & ClientsManifest valid

★ 1

MIT

JavaScript

Oct 3, 2026

dsh plugin --profile web add dsh-plugin-offpeak-badge

DeepSeek Harness plugin: real-time API cost with peak / off-peak rates — a composer pill, /cost, a session_cost tool and a JSON snapshot, with subagent and agent-team spend rolled in.

Tools & CapabilitiesManifest valid

★ 1

MIT

TypeScript

dsh plugin --profile web add dsh-api-cost

DeepSeek Harness usage analytics dock on the composer: Beijing-time peak/valley pricing with all-day weekend valley rate, live balance, cross-session history, by-date drill-down and charts.

Tools & CapabilitiesModels & ProvidersManifest valid

★ 0

dsh plugin --profile web add @deepseek-ai/dsh-client-ui-usage

by xiangrikuibaize

DSH 输入框下方的计费时段与余额药丸:峰价/谷价(含中国法定节假日与周末规则)、切换倒计时、账户余额(桌面端账号优先,API Key 兜底)

Tools & CapabilitiesDevelopment & InfrastructureManifest valid

★ 4

↓ 351/wk

NOASSERTION

JavaScript

Oct 31, 2026

dsh plugin --profile web add dsh-tide-badge