Introduction¶
When developing or debugging agents with DeepSeek Harness (DSH) and model calls depend on BeeAPI, you often need to check your account balance. Manually opening a web page to look it up is neither intuitive nor attention-friendly. This plugin provides a lightweight, native balance display and configuration entry point within DSH, integrating balance information into both the chat interface and the settings page to reduce the need to navigate to external web pages.
Plugin Scope¶
This is a BeeAPI account balance query plugin for DeepSeek Harness. It only calls the read-only endpoint https://beeapi.dev/v1/usage, performs no model inference requests, and does not provide request history or daily spending data. CNY values are estimated using a fixed exchange rate, not a real-time rate.
Core Features¶
-
Balance Indicator
- Displays the current balance below the chat editor, along with an estimated CNY value (using a configurable fixed USD/CNY exchange rate).
- Click the amount to toggle between CNY and USD.
- The indicator checks local state every 60 seconds while visible and requests an upstream refresh every 10 minutes. -
Balance Panel & Settings Page
- The plugin includes a native settings page supporting two connection methods:- Manually entering an API Key.
- Selecting an already-configured DSH BeeAPI chat/plot channel (only channels starting with
https://beeapi.devare accepted). - In manual mode, the Key is managed by DSH’s credential service; in channel mode, only the channel reference is stored, and the Key currently in use by the channel is resolved at query time.
-
Refresh Strategy
- Supports manual refresh.
- Automatically refreshes after a normal conversation turn completes (sub-agent turns excluded).
- Multiple refresh requests using the same Key within 5 seconds are merged into a single request.
Installation & Activation¶
This plugin is a local DSH Bundle, not an npm package. Follow these steps to install:
- Clone the repository into any working directory:
git clone https://github.com/gangchen0470/dsh-beeapi-balance.git
cd dsh-beeapi-balance
- Review and confirm
package.jsonandcordis.patch.yml(usually no modifications needed). - Use the DSH plugin manager’s
install_bundlecommand to install the absolute path of this directory:
dsh plugin install_bundle /path/to/your/dsh-beeapi-balance
- After installation, go to Plugins → BeeAPI balance in DSH to configure it.
On first installation, do not remove other Bundles. When updating, first check whether @local/beeapi-dashboard already exists, then replace it via the plugin manager.
Configuration¶
On the Plugins → BeeAPI balance page:
- Select a supported DSH BeeAPI chat/plot channel (limited to the
https://beeapi.devdomain). - Or manually enter an API Key. The Key is stored by DSH’s credential service, and the local Host only sends it to BeeAPI’s read-only endpoint when querying the balance.
Use Cases & Notes¶
This plugin is suitable for DSH users who frequently need to check their BeeAPI balance, especially developers using BeeAPI for model calls. Please note:
- The plugin runs with the current DSH process permissions. Review the source code and license (MIT) before installing.
- CNY values are estimates based on a fixed exchange rate. They do not reflect real-time rates or actual top-up prices.
- Do not paste API Keys into prompts, commit them to code repositories, or place them in environment variables.
- The specific appearance of the browser UI needs to be verified through browser control.
Summary¶
This plugin integrates BeeAPI balance queries into the native DeepSeek Harness interface, providing an intuitive view through the indicator below the chat editor and a dedicated settings page. It reduces the need to jump to external web pages, making it well-suited for developers who need to monitor their balance frequently.