Introduction¶
When using DeepSeek Harness (DSH) for WebUI development or interaction, frequently checking the API balance and the current pricing tier (peak/off-peak) usually requires switching windows or opening external pages. To reduce the number of steps, retrieving this information directly on the WebUI interface is a more efficient approach.
Plugin Overview¶
dsh_deepseekapi_quota is a plugin for the DeepSeek Harness WebUI, developed by maintainer JRNitre. It displays the account balance and pricing tier at the bottom of the left sidebar, helping developers monitor API usage in real time.
Core Features¶
The plugin provides the following features:
* Account balance display: Retrieves account balance data directly from the DeepSeek API.
* Pricing tier display: Distinguishes between peak and off-peak tiers and automatically calculates the price difference.
* Automatic refresh: Data automatically refreshes once per minute.
* Manual refresh: Clicking the balance cell refreshes the data immediately.
* Hover details: Hovering with the mouse shows detailed information about the balance breakdown and pricing tier.
* Conditional display: Displays only when the sidebar is in wide mode (width greater than 56px), avoiding clutter in narrow mode.
Installation and Activation¶
Before installation, ensure that DeepSeek Harness is installed and that the WebUI can be launched with the dsh web command.
- Run the installation command:
dsh plugin --profile web add github:jrnitre/dsh_deepseekapi_quota
- After installation, you must restart
dsh webto make it take effect.
Configuration¶
The plugin works by default without any configuration.
- API Key configuration: By default, it is resolved through DSH’s credential mechanism and references the environment variable
DEEPSEEK_API_KEY. You can also configure a credential with the same name in DSH settings/credentials. - Custom API address: If you need to override the API address, edit the
%DSH_HOME%/profiles/web/cordis.patch.ymlfile.
Notes¶
- Restart required: After installation or configuration changes, you must restart the
dsh webprocess. - Runtime mode: Only supports WebUI mode launched via
dsh web.
Conclusion¶
With a simple integration approach, this plugin seamlessly embeds API balance and pricing monitoring into the DSH WebUI, making it suitable for developers who frequently monitor API consumption.
Project URL: https://github.com/JRNitre/dsh_deepseekapi_quota