Skip to content

huanyuLv/dsh-balance-tide

30Last commit Aug 15, 2026

dsh-balance-tide DSH plugin

dsh-balance-tide adds a real-time info bar to the DSH web interface. It displays the current pricing period, countdown to the next switch, live balance, and estimated session cost. Hover details and a pricing page link help users plan usage efficiently.

How to install the dsh-balance-tide DSH plugin

dsh plugin --profile web add dsh-balance-tide

Copying does not run this command. Review the repository and version before installing the dsh-balance-tide DSH plugin.

dsh-balance-tide DSH plugin data source

dsh-balance-tide DSH plugin snapshot date: Aug 16, 2026

discovered

What the dsh-balance-tide DSH plugin can do

  • Shows pricing badge (standard/peak/off-peak) based on Beijing time
  • Displays countdown to next pricing switch, updating every second
  • Fetches live balance from official /user/balance endpoint with granted/top-up split
  • Estimates session cost using current-period prices and sessionProjections
  • Provides hover tooltip with full price tables and usage advice
  • Supports i18n (Chinese and English) following interface language
  • Zero configuration: reuses DEEPSEEK_API_KEY from DSH credentials

Where the dsh-balance-tide DSH plugin fits

  • Monitor account balance in real time while chatting in DSH web
  • Plan usage by knowing when peak/off-peak pricing starts and ends
  • Estimate the cost of the current session to avoid unexpected charges
  • Quickly access the official pricing page via the ? icon
  • Track balance changes across multiple API keys (if configured)

Who the dsh-balance-tide DSH plugin is for

  • DeepSeek Harness web profile users who want to keep an eye on spending
  • Developers and heavy API users who need to optimize usage during off-peak hours

dsh-balance-tide DSH plugin limitations

  • Session cost is an estimate based on current-period prices; the official invoice is authoritative
  • For multi-currency accounts, only the first currency is shown in the readout row (others appear in tooltip)
  • deepseek-chat and deepseek-reasoner models are no longer listed on the official pricing page; static entries are a fallback, not verified
  • Requires DSH web profile version 0.1.0-rc.6 or later
  • The apiKey config option is stored in plaintext; its use is discouraged

dsh-balance-tide DSH plugin: from the repository README

Quoted from the huanyuLv/dsh-balance-tide README, the upstream source of the dsh-balance-tide DSH plugin. Copyright remains with the original authors.

**English** | [简体中文](./README.zh.md) [![dsh-plugin](https://img.shields.io/badge/dsh--plugin-DeepSeek%20Harness-blue)](https://github.com/topics/dsh-plugin) [![license](https://img.shields.io/badge/license-MIT-green)](LICENSE) [![version](https://img.shields.io/badge/version-0.2.0-4176E6)](package.json) **DeepSeek Harness (DSH) Web plugin: account balance + peak/off-peak pricing tide indicator.** A live readout row under the composer: ``` [standard] peak pricing starts in 2d 5h | Balance ¥28.78 | ~¥0.42 this session | ? ``` Once peak/off-peak pricing takes effect (2026-08-17), the badge and countdown follow Beijing time in real time: ``` [off-peak] peak in 2h 15m | Balance ¥28.78 | ~¥0.42 this session | ? ← off-peak hours [peak] off-peak in 1h 30m | Balance ¥28.78 | ~¥0.42 this session | ? ← peak hours ``` ## Features - **Pricing badge**: `standard` (before 2026-08-17) / `peak` / `off-peak`, judged live in Beijing time - **Countdown**: time remaining until the next pricing switch, ticking every second — plan your usage ahead - **Balance**: live balance from the official `/user/balance` endpoint (granted / topped-up split) - **Session cost**: estimated at current-period

Read the full READMERepository license: MIT

dsh-balance-tide DSH plugin questions

How do I install dsh-balance-tide?

Run `dsh plugin --profile web add dsh-balance-tide` in your terminal. Then restart `dsh web` to activate the plugin. Make sure you have pnpm installed globally (`npm i -g pnpm`).

Does the plugin need my API key separately?

No. It reuses the DEEPSEEK_API_KEY from your DSH credentials. You do not need to enter it again. There is a fallback `apiKey` config option, but it stores the key in plaintext in a config file, so it's not recommended.

How accurate is the session cost estimate?

The estimate is based on the current-period prices and the sessionProjections data. It should be treated as an approximation. The official invoice from DeepSeek is the authoritative source for actual charges.

Can I change the peak/off-peak schedule or prices?

Yes. You can override `tideCutoff`, `peakWindows`, and `tidePrices` in the plugin's config section inside `$DSH_HOME/profiles/web/cordis.patch.yml`. This allows you to adjust for official pricing changes without waiting for a plugin update.

What happens if I use a reverse proxy in front of dsh?

You need to add your domain to the `allowedHosts` config array in the plugin's configuration. Otherwise, requests to the balance endpoint will be rejected with a 403 to prevent DNS rebinding attacks.