OwlNjust/DSH-DeepSeek-Balance ↗★ 0
dsh-deepseek-balance
DeepSeek balance monitor for DeepSeek Harness: real-time topped-up balance, period consumption (per model) and token usage (cache-hit input / cache-miss input / output), plus peak/off-peak price reminder (Liang Wenfeng / Liang Wengu). 适合需要实时掌握API额度、多模型消费明细及避开高峰期计费的用户。
Other repositories with this package name
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:OwlNjust/DSH-DeepSeek-BalanceREADME
Read the full README ↗Usage
| Thing | Where |
|---|---|
| API key / userToken | widget → 配置 |
| Time window | widget chips (今天 / 24h / 7天 / custom) |
| Refresh | 刷新 button (or automatic, at the configured pollIntervalMs — 5 min by default; paused while the tab is hidden) |
| Language | follows the host's preference, else the browser's; the EN/中 button in the panel header switches manually (remembered locally) |
| Pill summary | bottom-right: current price window + balance + period spend |
Configuration
Override fields per entry id in the profile's patch layer (config: replaces the whole
object, so unlisted fields fall back to the defaults):
- id: dsh-deepseek-balance
config:
pollIntervalMs: 900000 # poll cadence, 30s .. 24h, default 5 min
historyDays: 180 # snapshot retention / custom-window cap, 1 .. 400, default 90
usageTtlMs: 1800000 # successful usage-response cache, 1min .. 24h, default 1 h
usageErrorTtlMs: 600000 # failed usage-response cache, 1min .. 24h, default 10 min
maxSnapshots: 5000 # snapshot cap, 100 .. 100000
requestTimeoutMs: 15000 # per-request timeout, 1s .. 120s
The endpoints (balanceUrl / usageCostUrl / usageAmountUrl) are overridable too and
must be https. An invalid value fails activation naming the field instead of falling
back silently.