DSH Hub

jacujay/dsh-model-balance

dsh-model-balance

UIWeb UI0 GitHub stars· updated 2026-08-20

DSH plugin: auto-detect current model vendor and show balance/quota in the composer input row (DeepSeek/Moonshot/MiniMax/StepFun/Zhipu/SiliconFlow/OpenRouter + custom endpoints)

Install

npx @deepseek-ai/dsh plugin --profile web add github:jacujay/dsh-model-balance

Restart `dsh web` after install. Bundle APIs can change during the developer preview.

README badge

dsh-model-balance DSH Hub badge
[![DSH Hub](https://dshhub.dev/badge/dsh-model-balance.svg)](https://dshhub.dev/plugins/dsh-model-balance)

Paste this into your README. The star count updates with every catalog sync.

From the README

Excerpt from jacujay/dsh-model-balance, cleaned of badges and images.

dsh-model-balance

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).

Features

  • Auto vendor detection — reads the current default model's provider from DSH configuration and identifies the vendor by provider id, then by baseURL hostname as a fallback. Custom provider ids (e.g. minimax-cn) still match.
  • Built-in vendors — DeepSeek, Moonshot/Kimi, MiniMax, StepFun, Zhipu (quota only), SiliconFlow, OpenRouter.
  • Two result kinds — monetary balance (with granted/topped-up breakdown where the API provides it) and quota (MiniMax / Zhipu, which expose usage plans instead of money).
  • Input-row button — a small 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.
  • Settings page — Settings → Balance lookup: lists supported vendors and lets you add a custom balance endpoint for any provider (URL + response field path + bearer/raw auth + display name).
  • Key-safe — API keys are resolved host-side through the DSH credentials store and never reach the browser. Custom endpoint config persists at ~/.dsh/dsh-model-balance.json without any secrets.
  • Live in seconds — the host answers over same-origin HTTP routes; no restart needed after a page refresh.

Install

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.

Supported vendors

VendorEndpointKind
DeepSeek/user/balancebalance (CNY)
Moonshot / Kimi/v1/users/me/balancebalance
MiniMax/v1/token_plan/remainsquota (per-model %)
StepFun/v1/accountsbalance
Zhipu GLM/api/monitor/usage/quota/limitquota only
SiliconFlow/v1/user/infobalance
OpenRouter/api/v1/auth/keybalance (USD) / unlimited

New API-compatible proxies

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:

  • URL: https://your-relay.example.com/api/usage/token
  • Response path: data.total_available
  • Authentication: Bearer Token
  • Display name: optional

The 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.

Privacy & security notes

Related plugins