DSH OpenAI Usage Plugin: View Token Usage and Daily Costs in Harness

Introduction

In DeepSeek Harness (DSH), when running agents or connecting to OpenAI models, a common practice is to check usage figures in the OpenAI web billing page or to construct scripts to call the management API. These methods either require switching out of the working environment or maintaining separate tools. The community plugin dsh-openai-usage (maintainer liuweiqiang2016, category: Model Inference) brings usage and costs into the DSH settings panel. It supports statistics by model and project, and supports both Chinese and English interfaces, making it suitable for keeping an eye on consumption while residing in the desktop version of Harness.

Below is an introduction to the plugin’s positioning, capabilities, and installation configuration steps; the factual basis is the repository README and package.json (version 0.1.0, license MIT).

What is this

OpenAI Usage is a DSH plugin for the DeepSeek Harness Desktop: view OpenAI API usage, Token consumption, and daily costs within Harness. Data comes from the OpenAI official interface; the interface supports Simplified Chinese and English (see repository README.en.md).

The plugin declares a runtime environment of Node >=24.9.0, DSH >=0.2.2-rc.1 <0.3.0, and injects via Cordis patch and client settings page (@deepseek-ai/dsh-client-ui-settings etc.).

Core Features

The capabilities outlined in the README are as follows. After installation, you can use them at Settings → OpenAI Usage:

  1. Aggregate Metrics: View input, output, cached Token, and request counts.
  2. Dimensional Breakdown: View usage by model and project; view daily costs.
  3. Time Range: Supports filtering for this month, last 7 days, and last 30 days.

A note to supplement the description: Statistics are based on UTC dates; costs may be updated with a delay. Balances and credits need to be viewed via links inside the plugin pointing to the official OpenAI billing page, rather than showing all account information solely within the panel.

Installation and Enablement

Installation is done via the DSH graphical interface; do not use CLI commands not documented here.

  1. Open Plugins → Add Plugin in DSH.
  2. Enter the repository address and click Install:
https://github.com/liuweiqiang2016/dsh-openai-usage
  1. After installation, open Settings → OpenAI Usage.

Community directory page (independent site, no official affiliation with DeepSeek / High-Flyer): https://www.skillhub.cn/plugins/liuweiqiang2016/dsh-openai-usage

Configuring the Key

This plugin requires an OpenAI Admin API Key; regular model API Keys are not applicable.

  1. Go to the OpenAI Admin Keys page, create a key under the corresponding organization; contact the organization administrator if you lack permissions.
  2. Click Configure Key in the plugin, paste it, and select Save & Query.

Keys are saved by the Harness Credentials Service. Do not send them to chat or GitHub Issues.

Typical Usage

After completing installation and key configuration, the daily usage workflow can be summarized as:

  1. Go to Settings → OpenAI Usage.
  2. Select a time range (This Month / Last 7 Days / Last 30 Days).
  3. View Tokens and request counts in the overview, then drill down by model or project, comparing against the daily costs line.
  4. When account balance or credits are needed, use the link within the panel pointing to the official billing page.

The interface preview provided in the README uses mock data located at the repository’s docs/screenshots/overview-zh.png. It is for layout reference and does not represent your real organization data.

Suitable Scenarios and Notes

Who is this for: Developers or DevOps teams who frequently use OpenAI in DSH and need to keep usage and costs within the same workspace; scenarios where you wish to minimize switching between platform web pages and local environments.

Permissions and Security:

  • The plugin runs with the current DSH process permissions; you should review the GitHub source code and the MIT license before installing.
  • Admin API Key permissions are higher than regular Keys; they should only be granted to trusted environments and in accordance with organizational key management norms.
  • Usage and billing are based on OpenAI’s side; UTC dates and delayed updates may cause slight differences from local intuition.

Conclusion

dsh-openai-usage embeds OpenAI’s official usage data into the DSH settings page, covering Tokens, requests, model/project dimensions, and multi-day cost filtering, while distinguishing between Admin Key and regular Key to avoid credential misconfiguration. For more details and issues, see the repository README.

  • Directory page: https://www.skillhub.cn/plugins/liuweiqiang2016/dsh-openai-usage
  • GitHub: https://github.com/liuweiqiang2016/dsh-openai-usage
羽毛球分组比赛记分
小程序二维码

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

Xiaoye