dsh-account-switcher: DSH Operations-Level Multi-Account Management and High-Availability Switching

Introduction

When performing high-frequency model calls, multi-Agent concurrency, or automated pipelines in DeepSeek Harness (DSH), only a single DeepSeek account is often bound: quota consumption is fast, API rate limits (HTTP 429) are easily hit, and temporary service degradation may occur. Manually swapping tokens and restarting processes to switch accounts interrupts running tasks and hinders centralized credential management.

Below is an introduction to the community plugin dsh-account-switcher (package name @local/account-switcher), published by maintainer keerzzz and categorized under admin-security. From an SRE / operations perspective, it provides multi-account credential governance, zero-downtime hot switching, probes, and quota observability within DSH. Plugin information can be verified on the SkillHub directory page and the GitHub repository; the DSH ecosystem emphasizes “everything is a plugin”, and the community directory is an independent site with no official affiliation with DeepSeek / High-Flyer.

What Is This

DeepSeek Harness Account Switcher is a DSH plugin for operations and SRE scenarios: it maintains a multi-account credential store locally on the host machine, supporting high-availability primary-standby switching, task concurrency protection, latency and balance probes, and batch import/export. The current repository has about 2 stars on GitHub and is licensed under MIT (package.json version 1.0.0).

Core Features

The design philosophy is to place credentials, switching, and observability on the DSH runtime side, interfacing with the DeepSeek cloud platform APIs. The capabilities listed in the README are as follows (for capability description only, not an independent product commitment).

High-Availability Hot Switching and Task Mutual Exclusion

  • By rewriting the underlying Platform Grant, account switching is performed without restarting the DSH process; the next model call will use the new credentials.
  • Before switching, the number of tasks currently executing in agents.list() is checked; if the current account still has concurrent tasks, the switch is rejected to avoid task state corruption caused by session drift.

Latency and Availability Probes

  • Active probes: platform user status (/auth-api/v0/users/current) and model capabilities (/models).
  • Displays end-to-end round-trip latency (RTT, milliseconds) for each account, facilitating routing or selection reference among multiple accounts.

Quota and Balance Observability

  • Calls the official fund-related API (written as /user/balance in the documentation, and api.deepseek.com/user/balance in the English description), displaying the total balance, granted credits (Granted), topped-up funds (Topped-up), and currency (e.g., CNY / USD).
  • Supports refreshing the balance in the UI, making it easy to observe quota levels.

Credential Lifecycle and Local Security

  • Login self-healing: Monitors credentials/record-updated and automatically writes newly logged-in credentials into the local Vault.
  • Health checking and cleanup: Can concurrently check the health of all accounts in the store and mark invalid credentials; supports one-click cleanup (Prune) of invalid accounts.
  • Zero-trust local isolation: Credentials are stored only in the host’s protected credential store (documented as 0600 permissions), not uploaded to the cloud or sent to third parties.

Batch Import and Backup Migration

Supported input forms include (as stated in the README):

  • Tab-separated lines (account\tToken) or phone:token and similar formats;
  • Plain token lists;
  • Object array JSON, dictionary mappings, etc.

Export supports TSV, JSON, and plain token lists, facilitating mirror synchronization across multiple machines or environments.

Installation and Activation

Installation steps follow the repository README: place the plugin in the local module path of DSH Web profiles, declare it for loading in cordis.yml, then restart the Web service.

# 1. 克隆本插件到 DSH profiles 模块目录
git clone https://github.com/keerzzz/dsh-account-switcher.git ~/.dsh/profiles/web/node_modules/@local/account-switcher

# 2. 在 DSH 配置文件 cordis.yml 中确认加载:
# - id: account-switcher
#   name: '@local/account-switcher'

# 3. 重启 DSH 服务即可在设置面板中体验
pnpm dsh web

In package.json, dsh.client declares Web-side injection of @deepseek-ai/dsh-client-locale and @deepseek-ai/dsh-client-ui-settings, along with a cordis.patch.yml patch; the specific UI entry point depends on your local DSH settings panel.

Typical Usage (Based on the Documentation)

The README does not provide step-by-step screenshots, but the following reproducible approach can be summarized:

  1. After completing installation and activation, open the account-switching-related interface in the DSH settings panel (the documentation says “experience it in the settings panel”).
  2. Add accounts: Log in to DeepSeek normally in DSH; after the plugin monitors credentials/record-updated, it writes the credentials into the local Vault; you can also batch import them in the format described above.
  3. Before switching: confirm there are no concurrent Agent tasks bound to the current credentials; then perform the switch so the next call uses the new account.
  4. Operational inspection: run health checks on all accounts, view RTT and balances; perform Prune on invalid accounts; export TSV / JSON / token lists for backup or migration when necessary.

The specific button labels involved depend on the locale and client in your installed 1.0.0 package.

Use Cases and Notes

Who it’s for: Operations engineers, SREs, or heavy automation developers who need to manage multiple DeepSeek accounts on a single DSH host, want smooth switching when hitting 429 / tight quotas, and need to perform balance and probe inspections.

Please note before use:

  • The plugin runs with the current DSH process privileges, and credentials are stored in the local Vault; before installing, review the source code and the MIT license yourself to confirm it meets your security baseline.
  • Switching is subject to task mutual exclusion: you cannot switch accounts when there are active tasks. This is a deliberate design, not a bug.
  • Community plugin and directory page information may lag behind the repository README; in case of conflict, the documentation of the repository you cloned takes precedence.

Conclusion

dsh-account-switcher brings multi-account credentials, hot switching, concurrency protection, and balance / latency probes into the DSH settings and runtime, reducing the operational friction of “the single account hits its quota and you have to stop the service to switch accounts”. To learn more, visit the SkillHub plugin page and GitHub: keerzzz/dsh-account-switcher.

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

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

Xiaoye