Introduction

DeepSeek Harness (DSH) adopts an “everything is a plugin” architecture. When developing agents or calling large language models, correctly determining whether the system is currently in a “compute peak” or “off-peak valley” period directly affects cost, while real-time monitoring of the account balance helps avoid service interruptions caused by overdue fees. This article introduces the client plugin “Liang Wengu,” maintained by VinciBeans, which provides time-slot display, a countdown, and balance information directly in the session title bar.

Plugin Purpose

This is a client plugin that displays the current compute off-peak time slot (Liang Wenfeng/Liang Wengu) in the DeepSeek Harness session title bar and provides real-time countdown and account balance monitoring features.

Core Features

  • Time Slot and Countdown: Displays the current time slot and the remaining time until the slot changes on the right side of the session title bar.
  • Balance Monitoring: Permanently displays the DeepSeek account balance and shows warnings when the balance is insufficient or balance retrieval fails.
  • Details Menu: Click the capsule to expand it and view official pricing, the comprehensive unit price based on cache hits in the current session, and balance details.
  • Cross-Day Calculation: Valley-period calculations account for multiple days and statutory holidays, automatically pointing to the start time of the next peak period.
  • Theme Following: The capsule style automatically follows the DSH theme.

Installation and Enablement

You must first install DeepSeek Harness and successfully start the Web GUI once. Follow these steps to install the plugin:

  1. Install the plugin:
    dsh plugin --profile web add liangwengu
  1. Verify the installation:
    dsh --profile web --dump-config
  1. Restart dsh web, open any session, and the time-slot capsule will appear on the right side of the title bar.

Display Rules

The plugin determines time slots based on Beijing time:

  • Liang Wenfeng (Peak): Normal working days (Monday to Friday, excluding statutory holidays) from 09:00–12:00 and 14:00–18:00.
  • Liang Wengu (Idle): All other times, including weekends, statutory holidays, and weekends designated as workdays due to schedule adjustments.

Balance and Pricing

  • Balance Display: The current balance is displayed inline in the capsule. API keys are processed only on the host side and do not enter the browser, ensuring security. By default, polling occurs every 5 seconds, with retries following a backoff strategy on failure.
  • Details Menu: Click the capsule to expand it. The menu includes, in order:
    • Official Pricing: The official DeepSeek price list, showing the applicable tier for the current time slot.
    • Current Session Comprehensive Unit Price: The weighted unit price (CNY per 100 million tokens) calculated after deriving the cache hit rate from the tokenUsage projection.
    • Account Balance: Total available balance, unexpired grants, recharge balance, and availability details for each currency.

Compatibility

  • Supported Versions: dsh v0.1.3-alpha.1 ~ v0.1.7-alpha.1.
  • License: MIT.

References