OwlNjust/DSH-DeepSeek-Balance ↗★ 0

dsh-deepseek-balance

实时监控DeepSeek余额、模型消耗及Token用量 适合需要实时掌握API额度、多模型消费明细及避开高峰期计费的用户。

包名
dsh-deepseek-balance
兼容性
待验证
版本
0.2.0
许可证
MIT
最近更新
2026年9月29日

同名包的其他仓库

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:OwlNjust/DSH-DeepSeek-Balance

Usage

ThingWhere
API key / userTokenwidget → 配置
Time windowwidget chips (今天 / 24h / 7天 / custom)
Refresh刷新 button (or automatic, at the configured pollIntervalMs — 5 min by default; paused while the tab is hidden)
Languagefollows the host's preference, else the browser's; the EN/中 button in the panel header switches manually (remembered locally)
Pill summarybottom-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.