nabin-qq273274877/dsh-model-balance ↗★ 0
dsh-model-balance
Multi-provider account balance display for the DeepSeek Harness Web GUI. Queries real billing APIs (DeepSeek, StepFun, Kimi Coding, OpenRouter, MiniMax, xAI) and shows balance/quota in front of the model selector. Providers without an API-level billing endpoint show a clear 'Balance unavailable' state.
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:nabin-qq273274877/dsh-model-balance说明文档
阅读完整 README ↗dsh-model-balance
中文 | English
为 DeepSeek Harness Web GUI 提供多供应商真实账户余额显示。
在 composer 的模型选择器前面显示余额胶囊。切换模型 → 立即显示该供应商的余额。每次用量变动自动刷新。
目前支持的供应商
| 供应商 | 查询接口 | 数据类型 | 状态 |
|---|---|---|---|
| DeepSeek | GET /user/balance | 账户余额(¥) | ✅ 官方接口 |
| StepFun | GET /v1/accounts | 账户余额(¥) | ✅ 官方接口 |
| Kimi Coding | GET /v1/usages | 每周请求配额 | ✅ 官方接口 |
| OpenRouter | GET /api/v1/auth/key | Credit 余额 ($) | ✅ 官方接口 |
| MiniMax | GET /v1/token_plan/remains | 剩余额度 | ✅ 官方接口 |
| xAI / Grok | GET /v1/dashboard/billing/credit_grants | Credit 余额 ($) | ✅ 官方接口 |
| 通义 Token Plan | — | 仅控制台 | ⚠️ 暂不支持 |
| 小米 MiMo | — | 仅控制台 | ⚠️ 暂不支持 |
| Mistral、Groq、Cohere 等 | — | 仅控制台 | ⚠️ 暂不支持 |
添加新供应商? 有两种方式:
- 配置文件(推荐):编辑插件目录的
providers.json或创建~/.dsh/model-balance-providers.json