PengPeng6845/dsh-balance0

@pengpeng6845/dsh-balance

Real API balance monitoring for the DeepSeek Harness: polls the official /user/balance endpoint with your API key and shows the true remaining balance in the sidebar

AI Analysis

核心用途是监控 DeepSeek 官方 API 的使用额度与余额。适合使用自有 API Key 且需要防止因额度耗尽导致对话中断的开发者或高频用户。需要配置有效的 API Key 环境变量。

Package
@pengpeng6845/dsh-balance
Version
0.8.0
License
MIT
Last updated
Aug 21, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:PengPeng6845/dsh-balance

⚙️ 配置

在 profile 自己的 cordis.patch.yml 中按 id 覆盖:

  • id: balance config: balanceEnabled: true # 是否轮询官方余额端点 balanceApiKeyEnv: DEEPSEEK_API_KEY # 余额 API key 的凭据引用(环境变量名) balanceBaseUrl: https://api.deepseek.com balanceRefreshMs: 60000 # 兜底轮询间隔(毫秒) lowBalanceAlert: 5 # 低余额警戒线(账户币种单位)

键类型默认含义 balanceEnabledbooleantrue是否轮询官方余额端点 balanceApiKeyEnvstringDEEPSEEK_API_KEY余额 API key 的凭据引用 balanceBaseUrlstringhttps://api.deepseek.com余额 API 基地址 balanceRefreshMsnumber60000兜底轮询间隔;token 活动后约 20 秒也会主动刷新 lowBalanceAlertnumber5低于该余额数字变橙

余额以账户币种显示,不做任何汇率换算。