bowenliang123/dsh-context
bowenliang123/dsh-contextDSH 上下文洞察面板:Context 仪表盘 + /context命令 + Context 浏览器,查看 Context的分类组成、内容详情、演进趋势、压缩/注入事件、统计等一站式 Context 全生命周期管理。
自动识别当前模型厂商(内置 7 家),在输入框内显示余额或配额,未内置厂商可配置自定义接口。
Auto-detect the current model vendor and show its balance / quota right in the composer input row — a small button left of the model name, hover to peek, click to refresh. A settings page covers vendors without a public balance endpoint via custom endpoints.
Built for DeepSeek Harness (DSH web).
minimax-cn) still match.◈ icon before the model name in the native composer row. Hover opens a peek panel; click refreshes. Error / unsupported / quota states get their own colors.~/.dsh/dsh-model-balance.json without any secrets.Requires DSH web. From the plugin market or:
# from GitHub
dsh plugin --profile web add github:jacujay/dsh-model-balance
Then refresh the browser page.
| Vendor | Endpoint | Kind |
|---|---|---|
| DeepSeek | /user/balance | balance (CNY) |
| Moonshot / Kimi | /v1/users/me/balance | balance |
| MiniMax | /v1/token_plan/remains | quota (per-model %) |
| StepFun | /v1/accounts | balance |
| Zhipu GLM | /api/monitor/usage/quota/limit | quota only |
| SiliconFlow | /v1/user/info | balance |
| OpenRouter | /api/v1/auth/key | balance (USD) / unlimited |
New API exposes token usage at /api/usage/token, authenticated with the same API key used for model calls. Add a custom endpoint for the matching DSH provider (often openai) in Settings → Balance lookup:
https://your-relay.example.com/api/usage/tokendata.total_availableBearer TokenThe plugin recognizes New API's token_usage response automatically. It shows unlimited quota when unlimited_quota is true, otherwise it reports the remaining amount, total granted amount, and usage.
Anything else: add a custom endpoint in Settings → Balance lookup. The API key still comes from DSH credentials (apiKeyEnv of the provider), and the custom URL is called host-side with it.
~/.dsh/dsh-model-balance.json), no secrets.# no build step — host is plain ESM (lib/index.js), client is a plain
# __ModuleLoader__ bundle (client/client.js)
node --check lib/index.js
node --check client/client.js
MIT