DeepSeek Harness (DSH) uses a plugin architecture, and dsh-sophnet-balance is one of its plugins for querying SophNet balances. It is designed for scenarios where developers need to monitor quota and usage in real time while developing or debugging agents in the DSH Web GUI, providing built-in status display and data query features.

Plugin Positioning

This plugin is maintained by caijiachen34 and released under the MIT License. Its core purpose is to integrate SophNet account data query capabilities into the DSH Web UI, allowing developers to view balances, recharge status, credit limits, and historical usage without leaving their current workflow.

Core Features

  • Input box status indicator: Displays a pulsing dot on the right side of the input box, reflecting SophNet balance status in real time (green = normal, yellow = low, red = insufficient balance or no balance).
  • Liquid glass panel: Clicking the dot expands a panel. The top shows the total balance and status badge, followed by details such as recharge/bonus/credit limit/current debt/reminder threshold. The main panel area is a usage view, including total tokens, request count, and cost summary, with details viewable by service or by date; the default query range is the last 30 days.
  • Automatic enablement: The plugin detects the current model provider on the host side and displays its controls only when the sophnet provider is used (including wrapper names such as modlens-sophnet); after switching to another provider, the controls are automatically hidden.
  • Conflict handling: Within the same input box, the pulsing dot from the opencodego query plugin is automatically hidden to avoid visual interference.

Installation

Install it using the dsh plugin command and set the profile to web:

dsh plugin --profile web add github:caijiachen34/dsh-sophnet-balance

After installation, you need to restart dsh web so that the newly added client module is included in the browser manifest.

Typical Usage

1. Configure the API Key

The plugin first reads the SOPHNET_API_KEY environment variable (this variable is usually reused from DSH’s LLM provider configuration). If it is not configured, you can enter the key manually in the panel. The key is cached in ~/.dsh/.sophnet-state.json.

2. View the Balance

After switching to the sophnet provider, the pulsing dot on the right side of the input box displays the status. Click the dot to expand the panel and view detailed balance information.

3. Query Usage

The panel displays the last 30 days by default. You can select a start date and end date in the panel to run a query. The panel shows token statistics by service and by date, along with cost details.

Notes and Limitations

  • Provider dependency: The plugin is displayed only when the sophnet provider is in use; after switching to another provider, the controls are automatically hidden.
  • Data latency: Usage statistics may be delayed. If there are no API calls within the queried time window, the statistics may all be 0.
  • API structure differences: There are differences between the official documentation and the actual response structure (for example, the services field is singular in the documentation but plural in actual responses); the plugin has added compatibility handling. The documentation does not list fields such as creditLimit / currentDebt, but the actual API returns them; the plugin uses them to display the credit limit and current debt rows.
  • Development and debugging: For local development and debugging, you can run dsh plugin --profile web add file:/absolute/path/dsh-sophnet-balance from outside the plugin source directory.

Conclusion

For developers using SophNet as their model provider, dsh-sophnet-balance provides a convenient local entry point for monitoring balances and usage. The source code is hosted on GitHub, where you can view it or contribute.