DSH Team Budget: Managing Team API Keys, Usage, and Budgets in Harness

Preface

When multiple people share the same DeepSeek account balance, it is difficult to set individual caps, see how much each spent, or restrict which models can be used while issuing keys. Some might turn to sharing the official Key or writing their own authorization layer on a gateway, but the maintenance and audit costs are not low. The DSH Team Budget introduced below (repo: liuguangyu272/dsh-team-budget) integrates “member keys + self-hosted gateway + DSH management panel” into a workflow: administrators operate within DeepSeek Harness, while members only need to configure keys and gateway addresses; they do not need to install this plugin.

What is it

DSH Team Budget is a community-maintained DSH plugin, categorized under admin-security; the repository license is MIT, and it has no affiliation with DeepSeek official. It addresses the following: distributing independent API keys to team members, setting monthly/daily budgets and model permissions in DSH, and viewing usage analytics. Actual billing and request forwarding are handled by your self-hosted gateway, and the administrator connects to this gateway for management within the local DSH.

The connection relationship can be summarized as:

Member's DSH / Compatible Client
        ↓ Member Key + Gateway Address
Self-hosted Gateway: Checks budget & permissions, records usage
        ↓ Official Key saved by Admin
DeepSeek Official API

Core Features

Based on the project README, current capabilities include:

  • Member Keys: Generate, rotate, disable, delete; after deletion, the original key becomes invalid immediately, but historical records are retained.
  • Budget: Monthly/daily budgets; a shared monthly budget for the team under the official key; cycle switching based on Beijing Time; atomic reservation of fees before requests to mitigate the issue of duplicate quota occupation under high concurrency.
  • Policies: Budget threshold alerts (visible only in the admin panel), model whitelist, rate/concurrency/output limits.
  • Panel: Native DSH sidebar “API Usage Management” — 7/30-day cost trends, budget donut chart, member rankings, and name search.
  • Protocols: Chat Completions, Responses, Anthropic Messages, as well as independent Search/Fetch interfaces; supports non-streaming and streaming usage settlement.
  • Security: Official keys are stored encrypted, member keys store only a hash; conversation bodies and tool parameters are not persisted.

The gateway side requires Node.js 24.9+. The plugin documentation specifies verification for DSH 0.2.1-rc.5, with engines.dsh in package.json set to >=0.2.1-rc.5 <0.3.0.

Installation and Usage

The process is divided into three steps: first deploy an HTTPS gateway accessible to members, then install the DSH plugin on the administrator’s local machine and bind it to the gateway, and finally have members fill in their member keys in the client.

1. Deploying the Gateway

You need a server that members can access and an HTTPS address. The repository provides Docker Compose and Caddy configuration examples. After copying the environment file, write the public address into the configuration:

cp .env.example .env
# Edit .env, change GATEWAY_PUBLIC_BASE to your own HTTPS address
docker compose up -d --build

The gateway only listens on port 8791 on the server itself; it should be exposed to the outside via HTTPS reverse proxy. After the initial deployment, read the initial admin token inside the container (only for the administrator to connect to the panel, do not send it to members or submit it publicly):

docker compose exec gateway cat /data/admin-token.txt

2. Administrator Installation of the Plugin

Download dsh-team-budget-0.1.0.tgz from Releases and add it in the DSH plugin page. If you have the CLI, you can use:

dsh plugin --profile desktop add ./dsh-team-budget-0.1.0.tgz

You can also add the index hosted by this project to the DSH custom plugin index (this does not imply that the third-party directory has been audited or included):

https://raw.githubusercontent.com/liuguangyu272/dsh-team-budget/main/plugin-index.json

Reference a specific version from source code:

dsh plugin --profile desktop add github:liuguangyu272/dsh-team-budget#v0.1.0

Open the left sidebar “API Usage Management”, fill in the gateway address and admin token for the first time; after verifying a successful connection, add your own official API Key, and then create member keys.

3. Member Connection

Members configure this in DSH’s custom model interface; no need to install this plugin:

Setting Example
Protocol OpenAI Chat Completions
API Key Member key generated by admin: sk-team-…
Base URL https://gateway.example.com/v1
Model Models authorized by admin, e.g., deepseek-flash

Member keys cannot be used directly on the DeepSeek official address and must pass validation through your gateway. When the administrator’s computer is offline, members can still make calls as long as the gateway is online.

Billing and Usage Limitations

Costs are estimated based on the tokens returned by the official API and the price list maintained by the project, with the final bill being subject to the DeepSeek official account. Fees are reserved based on peak prices and output limits before the call; if the remaining balance is insufficient to reserve a single request, it will be rejected in advance. Note that alerts are currently only displayed in the admin panel and do not include email, WeChat, or push notifications to mobile phones. Only requests forwarded through this gateway will be tracked and limited; if a member uses the original official key to call the official interface directly, it is not within the scope of management of this plugin. Historical usage before installation will not be automatically recorded; member keys are unavailable when the server is offline. The pricing table verification date is 2026-11-11; you need to maintain it yourself if prices or the model directory change. For more complete deployment and support scope, see the repository’s docs/SETUP.md.

Applicable Scenarios and Notes

It is suitable for scenarios where DeepSeek usage needs to be distributed within a small team or group, but you do not want everyone sharing one official Key. Members can be in remote environments as long as they can reach your HTTPS gateway.

Before installing the DSH plugin, you should review the source code and the MIT license like any other community plugin, and confirm that the current DSH version is within the compatibility range declared by the plugin. The plugin runs under DSH process permissions; the gateway is deployed on a server under your control, and you must ensure the maintenance of HTTPS, backups, and sensitive information such as data/admin-token.txt.

Conclusion

DSH Team Budget splits team quota management into “self-hosted gateway enforcement + DSH native panel operations,” resulting in low configuration costs for members. The plugin directory page and source code repository are below; versions and installation packages are based on Releases.

  • Directory Page: https://www.skillhub.cn/plugins/liuguangyu272/dsh-team-budget
  • GitHub: https://github.com/liuguangyu272/dsh-team-budget
羽毛球分组比赛记分
小程序二维码

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

Xiaoye