Introduction¶
In DSH (DeepSeek Harness), when using multiple API providers simultaneously, checking each provider’s remaining amount or balance usually requires switching settings or opening external web pages. dsh-musage-card is a locally forked plugin that integrates multi-provider usage/balance views into the DSH interface. The card is fixed at the bottom of the sidebar (above the “Mobile Access” button) and automatically follows the model selected in the current session to display the corresponding quota information.
Core Features¶
The plugin mainly provides the following capabilities:
- Multi-provider support: Integrates usage query endpoints for 11 providers.
- Auto-follow: Based on the model selected in the current session, automatically switches to display the balance of the corresponding provider.
- Visual progress bar: Provides a remaining-quota progress bar; different periods (e.g., 5h, 7d) are distinguished by different colors.
- One-click browser login: For Cookie-based providers (e.g., MiMo, Claude, StepFun), provides automatic injection of login state (Windows only).
- Logout button: Provides an entry point for clearing the saved Cookie login state.
Supported Providers¶
The plugin supports the following 11 providers, covering both API Key and Cookie credential modes:
| Provider Alias | Display Type | Endpoint | Credential Type |
|---|---|---|---|
minimax / minimax-cn / minimax-en |
5h / 7d dual windows | api.minimaxi.com/v1/api/openplatform/coding_plan/remains |
MINIMAX_CN_API_KEY |
deepseek / deepseek-official / deepseek-account |
Balance (¥ / $) | api.deepseek.com/user/balance |
DEEPSEEK_API_KEY |
kimi / kimi-coding |
5h / 7d dual windows | api.kimi.com/coding/v1/usages |
KIMI_CODING_API_KEY |
zhipu / zai-coding-cn |
5h / 7d dual windows | open.bigmodel.cn/api/monitor/usage/quota/limit |
ZAI_CODING_CN_API_KEY |
openrouter |
Balance ($) | openrouter.ai/api/v1/credits |
OPENROUTER_API_KEY |
stepfun / stepfun-plan |
Balance (¥, itemized) | api.stepfun.com/v1/accounts |
STEPFUN_API_KEY (supports web login state) |
siliconflow / siliconflow-cn |
Balance (¥, itemized) | api.siliconflow.cn/v1/user/info |
SILICONFLOW_API_KEY |
tavily |
Used / total credits | api.tavily.com/usage |
TAVILY_API_KEY |
zenmux |
PAYG balance ($, itemized) | zenmux.ai/api/v1/management/payg/balance |
ZENMUX_MANAGEMENT_API_KEY |
xiaomi-token-plan-* / xiaomi / mimo |
Monthly total / compensation | platform.xiaomimimo.com/api/v1/tokenPlan/usage |
Browser Cookie |
claude / anthropic / claude-code |
5h / 7d dual windows | api.anthropic.com/api/oauth/usage |
sessionKey Cookie |
Installation and Enablement¶
The plugin has been published to npm and the dsh-plugin marketplace, and can be installed from the plugin marketplace or mounted locally.
- Install via the plugin marketplace:
dsh plugin install dsh-musage-card
- Local mount (development debugging):
Supports mounting a local path using thefile:protocol.
Configuration and Usage¶
API Key-based Configuration¶
For the first 9 providers that use API keys, no additional configuration is required. The plugin reuses the provider key already configured in DSH model settings (following the DSH convention: <PROVIDER 大写去特殊字符>_API_KEY).
Cookie-based Provider Configuration (MiMo / Claude / StepFun)¶
For providers such as Xiaomi MiMo, Claude, and StepFun that require browser login state, the “one-click login” feature is recommended.
One-click login (recommended, Windows only):
1. When the card displays “⚠” or “🔑 Click the card to log in”, click the card.
2. The plugin automatically opens a dedicated browser window (based on Edge or Chrome) and remains on the official login page.
3. Complete the login in that window.
4. After login is completed, the window closes automatically, and the card automatically refreshes to display usage.
Manual configuration:
If one-click login is unavailable (e.g., Edge/Chrome is not installed, or the environment is not Windows), manual configuration is required.
- Log in to the corresponding official web page (e.g.,
platform.xiaomimimo.comorclaude.ai). - Open browser developer tools (F12), check Network requests, and copy the full value of the Cookie or sessionKey.
- Edit the DSH credentials file
~/.dsh/.credentials.yamland append the corresponding key (it must be wrapped in quotes):
# ~/.dsh/.credentials.yaml(示例)
XIAOMI_MIMO_COOKIE: "api-platform_serviceToken=...; userId=...; ..."
CLAUDE_SESSION_KEY: "sk-ant-sid01-..."
DSH observes changes to this file and hot-applies them, no restart is required.
StepFun Special Notes¶
StepFun supports web login state, and it can be obtained through one-click login. After the Cookie expires, the card indicates that it is invalid. Click the card again to trigger the login flow and refresh the state.
Logout¶
For providers that support logout (e.g., StepFun, MiMo, Claude), a small “Logout” button appears in the top-right corner of the card. Clicking it clears the Cookie login state saved by the plugin, but does not affect your self-configured API key. After clearing, the card returns to the “Click the card to log in” state.
Location and Style¶
- Location: The insertion point is
sidebar.footer.action(bottom of the sidebar, above the “Mobile Access” button, order -100). - Style: Uses a semi-transparent glass material (backdrop-filter blur + highlight stroke), with support for light and dark themes.
- Refresh: Clicking the card refreshes it immediately; a 60-second scheduled refresh is also retained.
Notes¶
- Platform limitation: The one-click browser login feature currently only supports Windows.
- Cookie expiration:
- The Claude Cookie expires approximately every 8 hours.
- The MiMo Cookie becomes invalid upon logout.
- The StepFun login state must remain valid; otherwise the card will show a probe failure.
- Environment dependency: It requires the DSH environment to run.
Summary¶
dsh-musage-card, by using a glassmorphism card, centralizes multi-provider usage monitoring in the sidebar and solves the pain point of frequently switching to check balances. In particular, for Cookie-based providers that are hard to configure, such as Claude and MiMo, the one-click login feature lowers the barrier to use.
- GitHub repository: https://github.com/Lin-Dongg/dsh-musage-card
- Plugin directory: https://www.skillhub.cn/plugins/Lin-Dongg/dsh-musage-card