Introduction

The dsh web interface of DeepSeek Harness can be extended through plugins. dsh-credits is one such plugin for displaying quotas and consumption. It primarily solves three types of problems: whether the current account quota is available, approximately how much the current session has cost, and the cumulative cost over a period of time. It displays this information in the area below the dsh web input box and in the cumulative capsule in the bottom right corner.

What is it

dsh-credits is maintained by Gaq152 and is licensed under MIT. It displays built-in packages, balances, or custom HTTP quotas by provider, and provides model pricing, session estimation, and cumulative consumption. The current version is 0.3.0.

Core Features

  • Displays account quota and current session estimated consumption below the input box.
  • Displays a draggable cumulative consumption capsule in the bottom right corner.
  • Displays account quota status indicator (light), supporting DeepSeek official balance or OpenCode Go subscription usage.
  • Displays quotas following the current dialogue model provider.
  • Displays real-time generation throughput (TPS).
  • Estimates current session consumption based on model unit price, supporting peak and off-peak pricing.
  • Supports cross-session cumulative consumption estimation for today, yesterday, this week, this month, or custom time ranges.
  • Provides settings cards: Display, Quota Query, Threshold & Refresh, Model Pricing, YAML Export.
  • Independently configures quota sources per DSH provider: Built-in templates, Reusing another provider’s quota, Custom HTTP interface.
  • Supports exporting YAML to the current profile’s cordis.patch.yml.
  • Compatible with the new session projection interface for dsh-credits 0.3.0 and dsh 0.1.1-rc.1, while retaining compatibility with the old projection interface.

Installation and Enablement

First, install the plugin:

dsh plugin --profile web add dsh-credits

Restart dsh web after installation.

Use the absolute path of the current directory for local development:

dsh plugin --profile web add <absolute path of current directory>

When upgrading, remove the old version first, then clean pnpm store and install latest:

dsh plugin --profile web remove dsh-credits
pnpm store prune
dsh plugin --profile web add dsh-credits@latest

Uninstall:

dsh plugin --profile web remove dsh-credits

If migrating from dsh-balance, remove the old plugin first:

dsh plugin --profile web remove dsh-balance

Then delete the profile local directory, and the disabled: true written for dsh-balance in cordis.patch.yml.

Configuration and Quota Sources

Configuration can override $DSH_HOME/profiles/web/cordis.patch.yml, or be saved per card in Settings -> Quota. Settings updates the current dsh web process immediately upon saving. To keep quotas bound after service restart, copy the configuration from the YAML Exported card to the current profile’s cordis.patch.yml.

Quota sources are configured independently per DSH provider. The providerId in providerQuotas must match the actual ID in the DSH provider list. Providers that are not configured or disabled will not display quotas; however, current session consumption and TPS can still be displayed.

Three types of sources are supported: Built-in templates, Reusing another provider’s quota, and Custom HTTP interface. When using multiple OpenCode Go accounts, you can bind templateId: opencode-go to different providerIds and save keys separately. The OpenCode Go key parsing order is:

opencodeApiKey → OPENCODE_GO_API_KEY → ~/.local/share/opencode/auth.json

Custom HTTP Quotas

Custom HTTP quotas require filling in URL, credentials, authentication method, and field mapping, and verifying using “Test & Read Fields”. Tokens or Cookies entered directly are saved to DSH credentials and are not written to the exported plain configuration. The page only shows “Set”, allowing new values to be overwritten. Sensitive fields like Cookie, Authorization, Token, API Key in additional request headers will be masked.

SiliconFlow no longer provides built-in balance templates. When needed, select the custom HTTP interface for the corresponding DSH provider.

Legacy Configuration Compatibility

Old fields like quotaMode, provider, quotaSources will still be read for compatibility, but it is not recommended to continue using the new configuration. The new configuration focuses on quota sources bound per provider.

Applicable Scenarios and Notes

Suitable for viewing DeepSeek official balance, OpenCode Go subscription usage, current session estimated consumption, real-time TPS, and cross-session cumulative consumption in dsh web. Also suitable for displaying quotas of multiple providers or multiple OpenCode Go accounts separately.

Notes:

  • The plugin runs with the permissions of the current dsh process; check the source code and license before installing.
  • The license is MIT, and the source code repository is GitHub.
  • Custom HTTP quotas rely on external interfaces and credentials; you need to maintain the URL, authentication, field mapping, and credential validity yourself.
  • Do not write sensitive credentials to plain configuration; they will be processed according to plugin rules when saved on the page.

Conclusion

The value of dsh-credits is to put account quotas, current session estimates, and cross-session cumulative consumption in the same dsh web interface, reducing manual verification.

Links

  • GitHub: https://github.com/Gaq152/dsh-credits
  • Directory Page: Verified materials do not include the directory page content, and no specific URL is provided; you can search for dsh-credits in the community directory.