bunipai/dsh-balance-guard ↗★ 0
dsh-balance-guard
余额哨兵插件:在会话头部实时显示 DeepSeek 余额,支持低余额变橙提醒、系统通知及点击刷新。
AI 分析
核心用途是防止因 API 欠费导致 Agent 任务意外中断。适合重度依赖 DeepSeek 官方 API 的用户。支持在 settings.yaml 中自定义低余额提醒阈值和轮询间隔。
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:bunipai/dsh-balance-guard说明文档
阅读完整 README ↗配置
插件行配置(profile cordis.patch.yml,或通过 llm 同款设置节):
- insert:
- id: plugin-balance
name: dsh-balance-guard
config:
apiKeyEnv: DEEPSEEK_API_KEY # credential ref
baseURL: https://api.deepseek.com # 可用 $DEEPSEEK_BASE_URL 覆盖
pollIntervalMs: 30000 # 客户端轮询间隔
cacheMs: 15000 # 服务端缓存
timeoutMs: 10000 # 上游请求超时
lowBalanceThreshold: 5 # 低余额提醒阈值
lowBalanceCurrency: CNY # 阈值比较的币种
也支持在 $DSH_HOME/settings.yaml 里以 plugin-balance: 节覆盖
pollIntervalMs / cacheMs / timeoutMs / lowBalanceThreshold /
lowBalanceCurrency。