DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

Model Balance — DSH Plugin for DeepSeek Harness
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in
← Plugins

dsh-model-balance

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 en

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add dsh-model-balance@0.1.4
READMECompatibilityVersions

Compatibility and provenance

Model Balance is published as dsh-model-balance and currently resolves to version 0.1.4. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
web
Release source
npm
Registry updated
9/20/2026

Versions

0.1.4stable
9/9/2026
0.1.3stable
9/9/2026
0.1.2stable
8/24/2026
Show 2 more versionsCollapse versions
0.1.1stable
8/15/2026
0.1.0stable
8/15/2026

Related plugins

Loading related plugins…

Latest
0.1.4
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
252 kB
Files
18
Surface
web
License
MIT
Source
npm
GitHub
★ 4
Weekly downloads
89
Last push
9/9/2026
View source ↗Project homepage ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue

Related plugins

More verified plugins in models-usage.

Usage@linxin666/dsh-usageUsage statistics plugin for the dsh web GUI: per-provider balance and coding-plan quota detection plus a live token usage ledger, with a dedicated pet bubble for the current providerWhale Widgetdsh-whale-widgetDeepSeek balance whale widget in the bottom-right corner of the DSH Web interface: balance/today’s usage/peak-off-peak pricing, customizable bubble click sequence (text/balance/today/peak-off-peak/image/random phrases and parallel weighted selection), per-line styles and fonts, floating quick editinUsage Stats@ychris12138/dsh-usage-statsToken usage heatmap, provider balances, and subscription quotas for the dsh web GUICodex Connectdsh-codex-connectChatGPT OAuth and Codex models for DeepSeek Harness.

README

dsh-model-balance

中文 | English

为 DeepSeek Harness Web GUI 提供多供应商真实账户余额显示。

在 composer 的模型选择器前面显示余额胶囊。切换模型 → 立即显示该供应商的余额。每次用量变动自动刷新。

目前支持的供应商

供应商查询接口数据类型状态
DeepSeekGET /user/balance账户余额(¥)✅ 官方接口
StepFunGET /v1/accounts账户余额(¥)✅ 官方接口
Kimi CodingGET /v1/usages配额(7 天 + 5 小时)✅ 官方接口
OpenRouterGET /api/v1/auth/keyCredit 余额 ($)✅ 官方接口
MiniMaxGET /v1/token_plan/remains剩余额度✅ 官方接口
xAI / GrokGET /v1/dashboard/billing/credit_grantsCredit 余额 ($)✅ 官方接口
通义 Token Plan百炼控制台登录查看🔗 需登录
小米 MiMo小米平台控制台登录查看🔗 需登录
Mistral、Groq、Cohere 等——⚠️ 暂不支持

添加新供应商? 有两种方式:

  1. 配置文件(推荐):编辑插件目录的 providers.json 或创建 ~/.dsh/model-balance-providers.json
  2. 提交 PR:参见 src/host/strategies.ts — 添加解析器 + 策略条目

显示状态

胶囊根据供应商类型显示四种状态:

金额余额

金额余额

DeepSeek、StepFun、OpenRouter、xAI 等按金额计费的供应商,直接显示账户余额(点击刷新)。

额度百分比

额度百分比

Kimi Coding 同时显示「7 天周额度」与「5 小时速率额度」的剩余百分比(鼠标悬停可看剩余次数与重置时间)。

登录查看

登录查看

千问(百炼 Token Plan)、小米 MiMo 等无 API 余额接口,点击在新页面打开对应控制台。

暂不支持

暂不支持

既无 API 接口也无公开控制台入口的供应商。

工作原理

┌─────────┐    GET /model-balance/query    ┌──────────┐   Bearer API key    ┌──────────────┐
│  浏览器  │ ──────────────────────────────→│ DSH 宿主 │ ──────────────────→│ 供应商 API   │
│  (胶囊)  │←──────────────────────────────│  (路由)   │←──────────────────│  (真实数据)  │
└─────────┘    JSON 信封                    └──────────┘   余额/配额        └──────────────┘
  • 浏览器:渲染胶囊,在模型切换 / 对话结束 / 定时轮询 / 点击时触发查询
  • 宿主路由(/model-balance/query):从 DSH Credentials 解析供应商凭据,查询计费 API,缓存结果(成功 60 秒 / 失败 15 秒)
  • 凭据安全:API Key 永远不会到达浏览器

安装

# 通过 npm
npx @deepseek-ai/dsh plugin --profile web add dsh-model-balance

# 从 GitHub
npx @deepseek-ai/dsh plugin --profile web add github:nabin-qq273274877/dsh-model-balance

# 本地开发(link)
npx @deepseek-ai/dsh plugin --profile web add link:/path/to/dsh-model-balance

或者直接复制以下提示词给 AI:

请帮我安装 dsh-model-balance 插件,仓库地址:https://github.com/nabin-qq273274877/dsh-model-balance
按照 README 中的说明进行安装和配置。

然后重启 dsh web 并刷新页面。

卸载

npx @deepseek-ai/dsh plugin --profile web remove dsh-model-balance

自定义供应商

插件自带 providers.json 包含已支持的供应商配置。你可以:

  1. 直接修改插件目录下的 providers.json
  2. 或创建 ~/.dsh/model-balance-providers.json(优先级更高,会覆盖同名供应商)

配置文件格式:

{
  "providers": {
    "your-provider": {
      "name": "显示名称",
      "baseURL": "https://api.example.com",
      "endpoint": "/v1/balance",
      "keyEnv": "YOUR_API_KEY",
      "response": {
        "type": "currency",
        "currency": "CNY",
        "balancePath": "data.balance"
      }
    }
  }
}

字段说明:

字段必填说明
name否显示名称
baseURL是API 基础地址
endpoint是余额接口路径
keyEnv是存放 API Key 的环境变量名
response.type是currency(余额)或 quota(配额)
response.currency否货币代码,默认 "CNY"
response.balancePath是*JSON path,如 "data.balance"
response.limitPath是*配额上限的 JSON path
response.usedPath是*已用配额的 JSON path
response.remainingPath是*剩余配额的 JSON path
aliases否别名列表

修改后重启 dsh web 即可生效。

刷新策略

触发时机绕过缓存说明
切换模型否查询新供应商的余额(走宿主缓存)
对话结束是一轮结束后约 1.2 秒强制刷新(等供应商记账)
定时轮询否每 2 分钟自动刷新
点击胶囊是手动强制刷新

开发

git clone https://github.com/nabin-qq273274877/dsh-model-balance.git
cd dsh-model-balance
pnpm install
pnpm run build
pnpm test

# 链接到 DSH profile 进行实时测试
npx @deepseek-ai/dsh plugin --profile web add link:$(pwd)

项目结构

src/
├── types.ts              # 共享类型定义
├── host/
│   ├── index.ts          # 宿主插件:路由注册 + 缓存
│   └── strategies.ts     # 策略注册表 + URL 匹配 + 解析器
└── client/
    └── index.ts          # 客户端插件:BalancePill 组件 + 国际化

scripts/
└── build.ts              # esbuild:宿主 ESM + 客户端工厂打包

docs/
└── images/               # README 截图

test/
└── strategies.test.ts    # 策略匹配 + 解析器单元测试

许可证

MIT