The philosophy of DeepSeek Harness is “everything is a plugin.” When calling large models, the difference between peak and off-peak pricing is significant, and insufficient balance can directly interrupt a workflow. dsh-peak-price-panel is designed to solve these two problems by displaying the price list and balance status directly in the main interface sidebar, enabling developers to monitor billing in real time and recharge in advance.
Plugin Positioning¶
This is an information panel plugin for the DeepSeek Harness main interface, maintained by LucienLL and categorized under “Online Tools.” It integrates peak/off-peak price display, balance polling, and three-level threshold color-based alerts, and provides linked recharge buttons.
Core Features¶
- Peak/off-peak time display and countdown: Displays in Beijing time whether the current period is peak (weekdays 9:00–12:00, 14:00–18:00) or off-peak, with a countdown to the next transition. Weekends are fully billed at off-peak prices (effective from 2026-08-23). A banner appears before a transition (30 minutes in advance by default), indicating a price increase or half price.
- Real-time unit price display in the sidebar: The sidebar card displays in real time the output unit price of the configured model for the current period (full price during peak / half price during off-peak).
- Price list expiration reminder: If the price list data version has not been updated for more than
staleAfterDays(default 30 days), the sidebar “Output Unit Price” title turns yellow and shows “Price list may be expired.” - Balance polling and threshold color-based alerts: Polls
GET https://api.deepseek.com/user/balance, displays the total balance, and changes color with alerts based on three thresholds (default 50 / 20 / 5). - Recharge linkage for low balance: When the balance is low (urgent/extreme levels), the button pulses red, and the balance number turns red and bold.
Data and Code Decoupling¶
Since v0.2.0, the price list and peak/off-peak time windows have been decoupled from the code and converted to data configuration. The effective values come from the settings layer prices / peakWindows and are no longer hardcoded in the code.
- Real-time effective: Modifying the JSON in the settings layer takes effect in real time without reinstalling the plugin.
- Restart required for effect: Modifying the configuration via
cordis.patch.ymlrequires restarting the web to take effect. - Price adjustment method: After DeepSeek adjusts prices, only the settings layer
pricesneeds to be updated (andpeakWindows,scheduleVersionif needed), without changing code or releasing a new version.
Installation and Activation¶
Use the following command to install the plugin:
dsh plugin --profile web add dsh-peak-price-panel
The API key is resolved by an environment variable with the same name (default DEEPSEEK_API_KEY): it uses the same-named environment variable if present, and falls back to the DSH credential store otherwise.
Configuration Items¶
The main configuration is located under “Plugins → Cost panel” on the settings page:
- Balance thresholds:
warnThreshold(50),criticalThreshold(20),extremeThreshold(5). They correspond to reminder, warning, and extreme thresholds, respectively. - Polling and notifications:
refreshSeconds(60) controls the balance refresh interval;peakLeadSeconds(1800) controls the advance notification time for peak/off-peak transitions. - Price data:
pricesis the unit price table (¥/1M tokens, peak price);scheduleVersion(default 2026-08-23) is used to determine expiration;peakWindows(such as [[9,12],[14,18]]) defines peak time windows on weekdays. - Display control: If
modelsis left empty, all models in the price list are displayed;currencyonly affects the currency display symbol for the balance and does not convert unit prices.
Testing and Dependencies¶
The project provides unit tests for verification:
node --test test/*.mjs
The plugin depends on the @deepseek-ai package family.
Use Cases and Notes¶
Suitable for developers who need fine-grained cost control and frequently call the DeepSeek API. It is recommended to review the source code and license (MIT) before installation.
Summary¶
With this plugin, developers can monitor costs and balances intuitively. For more details, visit the GitHub repository or the Skills catalog.