dsh-aliyun-balance: View Aliyun Balance at a Glance in DSH

Preface

When using DeepSeek Harness (DSH) to connect to the Qianwen platform API and paying with Aliyun vouchers or account balance, you cannot see “how much voucher balance remains and when it expires” within the chat window. Billing and consumption statistics are a separate issue; if you only want to know the current available funds, you need to check the Aliyun BSS stock separately. Below is an introduction to the community plugin dsh-aliyun-balance (maintained by wai549077). It displays a floating line in the DSH interface showing the total of voucher balance and account balance. Hovering over it reveals voucher details and expiration dates; it performs read-only BSS operations and does not track consumption statistics.

What is this

dsh-aliyun-balance is a DSH plugin with the npm package name dsh-aliyun-balance. The current version is 0.1.2, and the license is MIT. On SkillHub, it is categorized as a networking tool; the package metadata also marks it as “Cost” and “Web UI”, supporting both host and web surfaces.

It answers the question: How much money is left to spend (voucher balance + Aliyun account balance), rather than how much has been spent. The data comes from the current stock in Aliyun BSS; it is complementary to dsh-cost-meter—the latter estimates consumption by tokens but cannot query voucher details.

The README states it is primarily aimed at users who have received the Aliyun 300 RMB “Cloud Work Open Items” (云工开物) exclusive voucher for university students and are using the Qianwen platform API with DSH. The repository also includes a step-by-step tutorial with images covering everything from claiming the voucher to integration (docs/阿里云300学生券-千问AI平台-DSH接入教程.md).

Core Features

The interface displays a line similar to:

Available ☰ ¥128.50

“Available” represents the Total Available (voucher balance + account balance). Key operations:

Action Effect
Hover Expand details: voucher balance, face value/used amount, earliest expiration time, cash/credit control, etc. (All read directly from BSS, not calculated)
Click (not ☰) Bypass cache and refresh immediately
Drag / Double-click Move position / Reset to default position
Click ☰ Open panel: Credentials, Appearance, Display items

Balance and vouchers are refreshed every 5 minutes by default. The plugin does not track consumption and does not look at session events; to know how much has been spent, you need to use dsh-cost-meter.

Optional “Pricing Period” display (Qianwen platform off-peak/peak criteria, with 22:00–08:00 GMT+8 being off-peak) is only meaningful for models that use dual-tier pricing listed in the README; if not needed, it can be turned off in the panel.

Network permissions are declared in package.json as https://*.aliyuncs.com; the credentials section allows changing the endpoint, but only allows *.aliyuncs.com domains.

Installation and Activation

DSH installs plugins from local directories: first place the directory containing package.json in a fixed location (do not place it in a temporary directory; it needs to be reinstalled if moved), then state the local path in the desktop session, for example:

Install this local directory D:\Plugins\dsh-aliyun-balance as a plugin

Methods for obtaining the directory provided in the official README include:

Clone from GitHub (Recommended):

git clone https://github.com/wai549077/dsh-aliyun-balance.git dsh-aliyun-balance

Install package from npm locally:

npm i dsh-aliyun-balance

Add via Command Line (Note the profile):

dsh plugin add dsh-aliyun-balance

The README explains: dsh plugin cannot be used for the desktop profile on the desktop client (this profile is managed only by the Electron application). For the desktop client, use conversational installation via local directory, or wait for direct installation from the plugin market and tell DSH “Install dsh-aliyun-balance”; for web (dsh web), you can use:

dsh plugin --profile web add dsh-aliyun-balance

Self-check after installation: The line should appear in the interface; on Windows, the log %USERPROFILE%\.dsh\.dsh-aliyun-balance.log should contain {"event":"apply"}. If it does not appear, restart the client once. The tested environment is DSH Desktop (Windows) 2.0.17; the web profile mechanism is similar, but the README notes it has not been tested.

If credentials are not configured, that line will display “Not Configured”.

Configuring Credentials

  1. Create a sub-account in Aliyun RAM (do not use the primary account). It is recommended to select “Use permanent AccessKey access” and do not select console login.
  2. Read-only authorization: bss:DescribeAcccount (official spelling has double c), bss:DescribeCoupons, or the system policy AliyunBSSReadOnlyAccess.
  3. Create an AccessKey and save the AccessKey ID / Secret (The Secret is shown only once at creation).
  4. In DSH, click ☰ → Credentials & Settings → Enter AK/SK → Save Credentials → Test Connection.

Credentials are written to the DSH official credential service; the local ~/.dsh/.credentials.yaml is plain text YAML, so be sure to use a read-only sub-account AK. The plugin settings interface does not echo the keys, only returning hasAk / hasSk; the query host is business.aliyuncs.com, and there are no write operations.

Typical Usage

After installation and credentials are completed, daily usage involves: looking at the total amount on that line; hovering when vouchers are about to expire or when you want to verify voucher face value/usage; clicking ☰ to enter the panel when you need to change AK, appearance, or turn off the pricing period. Clicking the line forces a refresh, which is suitable for checking stock immediately after recharging or deducting a voucher.

When used in combination with dsh-cost-meter: this plugin focuses on “how much is left to spend,” while cost-meter focuses on “how much was spent in this conversation.” The data sources for the two are different and do not overlap.

Applicable Scenarios and Notes

Suitable for: Developers paying for DSH (especially Qianwen API) with Aliyun vouchers and/or account balances who wish to see stock and voucher expiration information persistently within the IDE.

Before Installation: The plugin runs under DSH process privileges, holds your configured AK/SK, and accesses Aliyun BSS; before installing, you should read the source code and MIT license at the GitHub repository to ensure the read-only RAM policy meets your security requirements.

Reading Notes: BSS stock may lag relative to actual deductions, so it is not suitable to infer single consumption amounts by subtracting balances before and after a conversation. The plugin does not upload Aliyun data from the interface to third parties (explained in the “About” section of the README).

For troubleshooting, refer to the README: “Forbidden” is usually due to missing bss:Describe* / bss:Query* permissions in RAM; position anomalies can be reset by double-clicking or unchecking “Lock Position”.

Conclusion

dsh-aliyun-balance condenses Aliyun vouchers and account balance into a draggable widget line within DSH. It performs read-only BSS operations and only reports stock, creating a clear division of labor with consumption statistics plugins. See the SkillHub Plugin Page for directories and details, and see GitHub: wai549077/dsh-aliyun-balance for source code and complete installation instructions.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye