huanyuLv/dsh-balance-tide ↗★ 6

dsh-balance-tide

DeepSeek 余额 + 峰谷计价潮汐提示插件: 在 dsh Web UI 输入框下方显示账户余额、本会话估算消耗,并在余额前提示当前峰/谷价格档位、距下一次切换的倒计时与使用建议

套件
dsh-balance-tide
相容性
待驗證
Harness 依賴範圍
^0.1.0-rc.6
Cordis 依賴範圍
^4.0.1
版本
0.4.0
授權
MIT
最近更新
2026年8月22日

安裝

$npx -p @deepseek-ai/dsh dsh plugin --profile web add dsh-balance-tide

Configuration (in $DSH_HOME/profiles/web/cordis.patch.yml)

- id: dsh-balance-tide
  config:
    refreshIntervalMs: 300000   # how often the host polls the balance API
    clientPollIntervalMs: 30000 # how often the browser re-reads the cache
    currency: CNY
    allowedHosts: []            # register your domain here if you front dsh with a reverse proxy

When the official prices or the schedule change, override them in config — no need to wait for a plugin release:

- id: dsh-balance-tide
  config:
    tideCutoff: '2026-08-17T00:00:00+08:00'   # when peak/off-peak pricing starts
    peakWindows:                              # peak hours (Beijing time, [start, end))
      - { start: 9, end: 12 }
      - { start: 14, end: 18 }
    tidePrices:                               # per-tier prices (per 1M tokens)
      flat:
        deepseek-v4-flash: { cacheHit: 0.02, cacheMiss: 1, output: 2 }
      peak:
        deepseek-v4-flash: { cacheHit: 0.1, cacheMiss: 3, output: 9 }
      offpeak:
        deepseek-v4-flash: { cacheHit: 0.05, cacheMiss: 1.5, output: 4.5 }

peakWindows: [] means there are no peak hours at all — use it if the tiered pricing is ever withdrawn.