Preface¶
DeepSeek Harness (DSH) adopts an “everything is a plugin” architecture. When running agents locally or debugging, frequently switching to the DeepSeek platform console to check the balance and today’s spending interrupts the workflow. This information needs to be available directly and in real time within the DSH web interface.
What It Is¶
dsh-deepseek-quota is a plugin designed for the DSH Web GUI and maintained by user ricardolicong. It displays the quota status and spending details of the DeepSeek API through a floating card in the bottom-right corner, without leaving the current page.
Core Features¶
- Floating card display: The card is fixed in the bottom-right corner of the page and does not block the main interface.
- Key information display: It shows the total balance, availability status, current conversation cost, and today’s spending.
- Automatic refresh: The balance refreshes automatically every 60 seconds, and the conversation cost refreshes every 5 seconds.
- Interaction and persistence: The card can be dragged and supports minimizing; its position and state are stored in local storage and persist after a page refresh.
- Error handling: It provides clear error-state prompts for a missing API key, network failures, or API errors.
- Pricing calculation: It uses the official DeepSeek price list to calculate the current conversation cost.
- Local security: The API key is processed locally only and does not leave the user’s machine.
Installation and Enabling¶
Prerequisites: DSH CLI and pnpm are installed.
dsh plugin --profile web add dsh-deepseek-quota
After installation, enable it by following these steps:
- Restart the web application:
dsh web. - Open http://127.0.0.1:3080 and refresh the page.
- Configure
DEEPSEEK_API_KEYon the settings page, or export it as an environment variable.
Typical Usage¶
Once DEEPSEEK_API_KEY is configured, the quota card appears in the bottom-right corner. To retrieve official today’s spending data, you can set the optional environment variable DEEPSEEK_PLATFORM_TOKEN; if it is not set, the plugin uses an estimated value.
Notes¶
- The plugin depends on DSH CLI and pnpm.
- The API key is processed locally only, and the browser only accesses locally registered routes.
- If
DEEPSEEK_PLATFORM_TOKENis not configured, today’s spending is displayed as an estimated value.
Summary¶
dsh-deepseek-quota integrates quota monitoring into the DSH interface, providing real-time conversation cost calculation based on official prices and balance status display. It is suitable for agent developers who need to continuously monitor API resources locally.
- Directory page: https://www.skillhub.cn/plugins/ricardolicong/dsh-deepseek-quota
- Source code: https://github.com/ricardolicong/dsh-deepseek-quota