DeepSeek Harness Peak and Off-Peak Pricing Alert Plugin

Introduction

The DeepSeek Harness (DSH) plugin ecosystem follows an “everything is a plugin” philosophy. Developers can mount custom components in the session header to consolidate information that would otherwise be scattered across multiple tools. For developers who frequently need to track API billing time windows, manually checking the pricing page makes it easy to miss the switching time and incur unnecessary costs. The Peak/Valley Pricing Reminder plugin places a small badge in the session header, displaying in real time whether the current API billing period is peak or off-peak, and provides a countdown to the next switch along with holiday schedule details.

Plugin Overview

This is a client-side plugin for DeepSeek Harness, authored by maintainer LiuLi-Kuang. The plugin displays a badge on the right side of the session header. Based on the DeepSeek API’s peak/off-peak pricing rules, it classifies the current time as either “Liang Wenfeng” (peak) or “Liang Wengu” (off-peak), and on hover, reveals a switch countdown, pricing details, and the applicable holiday schedule. The plugin includes automatic holiday synchronization and a local fallback mechanism, covering both the current and following year without requiring a plugin release.

Core Features

  • Session header badge display
  • Peak hours display “Liang Wenfeng” in amber
  • Off-peak hours display “Liang Wengu” in teal
  • Time window rules (Beijing Time, UTC+8):
    • Peak: Monday–Friday 09:00–12:00, 14:00–18:00 (excluding statutory holidays)
    • Off-peak: All other times (lunch break 12:00–14:00, nighttime, weekends, statutory holidays)
  • Billing is automatically determined by the timestamp of the request; no toggle required
  • Make-up workday Saturdays and Sundays are still treated as weekends, with full-day off-peak pricing
  • The determination uses “day of the week” rather than “workday status,” per DeepSeek API pricing page footnote 2

  • Hover card

  • Hovering over the badge reveals a switch countdown, pricing details, and the applicable holiday schedule
  • The card displays the currently effective year and sync time, e.g., “2026 / 2027 · synced 11-24”
  • Language follows the system: zh-* in navigator.languages displays Chinese; all others display English
  • In both languages, the badge always shows “Liang Wenfeng / Liang Wengu”; what switches with language is the hover card, countdown, time window descriptions, and other supporting text

  • Automatic holiday synchronization

  • Syncs the current and following year each time the page loads, then refreshes every 6 hours
  • Sync chain: browser-side client.js → host-side entry.js → timor.tech API
  • The host registers a local route on the DSH built-in web server, proxies upstream requests, and caches in memory for 6 hours
  • On network failure or upstream downtime, automatically falls back to localStorage cache and the built-in 2026 table
  • Supports upstream source switching: configure upstream and timeoutMs in the config section of cordis.patch.yml

  • Self-check and development

  • Provides a self-check script scripts/verify.mjs (zero dependencies, Node 18+); running npm test executes approximately 55 assertions against core logic
  • Supports setting a fixed language in the console: localStorage.setItem('dsh-liang-feng-gu:locale', 'en') or 'zh'

Installation & Activation

git clone https://github.com/LiuLi-Kuang/dsh-liang-feng-gu.git
  1. Open DSH left sidebar → Plugins → Add Plugin
  2. Enter the local absolute path of the cloned directory (i.e., this directory)
  3. Install → Refresh the page as prompted (Ctrl+R)

Method 2: Command Line

dsh plugin add <absolute path of this directory>

The plugin is linked into the profile via link:: changes to client.js take effect after a page refresh; changes to entry.js (host-side) require a DSH restart.

Typical Usage

  • Open a DSH session; a badge appears in the top-right, indicating whether the current period is “Liang Wenfeng” or “Liang Wengu”
  • Hover over the badge to view the switch countdown and pricing details
  • On first load or page refresh, check the “Data” line in the hover card to confirm the holiday schedule has been synced (e.g., 2026 / 2027 · synced 11-24)
  • Run localStorage.setItem('dsh-liang-feng-gu:locale', 'en') in the console and refresh to switch the interface language

Use Cases & Notes

  • Suited for developers who need real-time awareness of API billing windows and want to avoid peak-hour pricing
  • The plugin runs with DSH process privileges; review the source code and license before installation
  • Holiday data is sourced from the community-maintained timor.tech, not an official source; this plugin only provides reminders and does not affect actual billing
  • The badge is displayed only when a session is open; it does not appear on a bare launch page
  • Relies on the local system clock; an incorrect system time will affect the determination

Conclusion

This plugin displays peak/off-peak billing status in real time in the session header, and provides a switch countdown along with holiday schedule details. It is well suited for developers who require fine-grained cost control. For more details or to contribute code, visit the plugin catalog page and the GitHub repository.

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

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

Xiaoye