DeepSeek Harness (DSH) uses a plugin-based architecture. When using a MiniMax Token Plan subscription, checking the remaining quota usually requires opening the browser console or navigating to the MiniMax website. The dsh-minimax-usage plugin reads the official Token Plan usage API and displays the remaining quota directly next to the model selector in the Web UI, making it easy to check status during a conversation.
Basic Information¶
- Name: dsh-minimax-usage
- Type: Client plugin
- Maintainer: pan17
- License: MIT
- Purpose: Displays inline in the DSH Web UI the 5-hour and 7-day remaining progress bars and details for MiniMax Token Plan.
Installation and Enablement¶
Installation using npm is recommended. Use the following installation command:
npx @deepseek-ai/dsh plugin --profile web add dsh-minimax-usage
After installation, DSH must be restarted.
Note: On npm, the name dsh has been occupied since 2016 by an unrelated JS shell package. That package does not expose a CLI bin and can cause a could not determine executable to run error. The DSH CLI is published under the scoped package @deepseek-ai/dsh, so the full package name must be used.
If pnpm reports that build scripts are not allowed (ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED), add the following configuration to the profile’s pnpm-workspace.yaml, then rerun the installation command:
allowBuilds:
dsh-minimax-usage: true
Function Description¶
1. Inline Usage Bar and Hover Details¶
The plugin displays a compact usage bar to the left of the model selector in the chat box, showing remaining progress for both the 5-hour and 7-day windows. Hovering over the area with the mouse or focusing it with the keyboard reveals the domestic/international site, plan name, window progress, and reset countdown.
2. Display by Provider¶
The usage bar is shown only when the currently selected provider is minimax-cn or the minimax Token Plan. If another provider is selected (even if the model name contains MiniMax), the area remains hidden.
3. Interaction¶
- Click to refresh: Clicking the usage bar forces a data refresh and does not change the current model selection or trigger a send action.
- Credential source: The plugin first reads credentials from the DSH context, then falls back to process environment variables. The international site uses
MINIMAX_API_KEY, and the domestic site usesMINIMAX_CN_API_KEY.
4. Automatic Refresh Mechanism¶
The plugin’s refresh logic is as follows:
* Runtime refresh: Only when an active running Agent is using the minimax or minimax-cn Token Plan provider will the plugin force-fetch official usage data once every 30 seconds.
* Idle refresh: When an Agent returns to an idle state after MiniMax has been used in the current round, it waits 15 seconds and then performs one idle refresh. After that, the heartbeat interval starts at 2 minutes and doubles each time (2m, 4m, 8m…), capped at 24 hours. If MiniMax is used again and the Agent becomes idle, the heartbeat interval resets to 2 minutes.
* Reset refresh: Each round’s snapshot triggers a “post-reset refresh” 30 seconds after the 5-hour window reset time, to fetch the refreshed quota as soon as the window rolls over.
* Cache read: The usage bar itself reads the Host cache every 15 seconds only; clicking it forces a refresh.
Usage Example¶
- In DSH’s Settings → Models, fill in the MiniMax Token Plan subscription Key (note: a regular pay-as-you-go API Key cannot be used).
- Select a MiniMax Token Plan model in the chat box.
- The usage bar appears to the left of the model selector. Hover to view details and click to refresh.
Notes¶
- Key type distinction: Subscription Keys and regular open-platform API Keys must not be used interchangeably. If the usage API rejects a regular Key, the page prompts you to use a subscription Key.
- Data display: The plugin displays the official remaining quota as returned, without performing local “corrected” deductions. The semantics of
remains_timeare defined by the MiniMax console. - Zero quota handling: Models with
*_quota = 0display as “Not included” rather than 0%. - Ecosystem background: DSH plugin catalogs (such as SkillHub) are independent sites and have no official affiliation with DeepSeek or High-Flyer.