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.

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.6
READMECompatibilityVersions

Compatibility and provenance

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

DSH compatibility
*
Runtime surfaces
web
Release source
npm
Registry updated
11/4/2026

Versions

0.1.6stable
10/22/2026
0.1.5stable
9/30/2026
0.1.4stable
9/9/2026
Show 4 more versionsCollapse versions
0.1.3stable
9/9/2026
0.1.2stable
8/24/2026
0.1.1stable
8/15/2026
0.1.0stable
8/15/2026

Related plugins

Loading related plugins…

Latest
0.1.6
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
272.1 kB
Files
18
Surface
web
License
MIT
Source
npm
GitHub
★ 3
Weekly downloads
336
Security scan
✓ v0.1.6 scan passed
Last push
10/22/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.

Whale 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 editinOur Free Model@ebony-vinyl/dsh-our-free-modelOur Free Model — Install this plugin in dsh to use cutting-edge models including DeepSeek V4.1 Flash and Kimi K3, with no login, registration, or API Key required. The desktop version also offers an EAC co-payment channel; starting with 2.0, it supports ten account channels: LobsterAI, Qoder, TRAE, 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 compact price glance card above the sidebar's Settings rowConnect Workbuddydsh-connect-workbuddyConnects locally signed-in WorkBuddy models (domestic and international versions) to DeepSeek Harness, automatically reading each model’s points multiplier from the upstream catalog on every refresh, with per-model image input toggles, multi-account switching, automatic account rotation from an acco

README

dsh-model-balance

中文 | English

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

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

目前支持的供应商

供应商查询接口数据类型状态
DeepSeekGET /user/balance账户余额(¥)✅ 官方接口
DeepSeek Account(官方登录)Host 账号服务 get_user_summary充值余额 + 赠金(¥)✅ 官方登录
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小米平台控制台登录查看🔗 需登录
腾讯 TokenHub腾讯云控制台监控页跳转控制台查询🔗 需登录
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、腾讯 TokenHub 等没有可用的 API 余额接口,点击在新页面打开对应控制台查询。其中腾讯 TokenHub 指向腾讯云 TokenHub 的监控页(/tokenhub/monitor):它的 OpenAI 兼容网关(tokenhub.tencentmaas.com)只提供 /v1/models、/v1/chat/completions,用量与额度只能登录腾讯云控制台查看。DeepSeek Account(官方登录)在尚未登录时也是这个状态,登录后即显示钱包余额。

暂不支持

暂不支持

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

工作原理

┌─────────┐    GET /model-balance/query    ┌──────────┐   Bearer API key    ┌──────────────┐
│  浏览器  │ ──────────────────────────────→│ DSH 宿主 │ ──────────────────→│ 供应商 API   │
│  (胶囊)  │←──────────────────────────────│  (路由)   │←──────────────────│  (真实数据)  │
└─────────┘    JSON 信封                    └──────────┘   余额/配额        └──────────────┘
  • 浏览器:渲染胶囊,在模型切换 / 对话结束 / 定时轮询 / 点击时触发查询
  • 宿主路由(/model-balance/query):从 DSH Credentials 解析供应商凭据,查询计费 API,缓存结果(成功 60 秒 / 失败 15 秒)
  • 官方登录账号:deepseek-account 这类路由没有 API Key(认证走登录凭据),宿主改为调用 DSH 账号服务读取 DeepSeek Platform 钱包(充值余额 + 赠金);未登录时胶囊显示「点击登录查看」
  • 凭据安全: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