Introduction¶
In the DeepSeek Harness (DSH) plugin ecosystem, multi-account management often means manual switching or complex configuration. DSH RotaKit combines local WorkBuddy / CodeBuddy accounts that have previously been signed in on the device into a failover model pool, together with a complete set of credit automation features. The plugin reads desktop client credentials, automatically discovers accounts, and implements failover and credit management.
Core Features¶
Multi-Account Pool¶
The plugin supports fine-grained scheduling of local accounts:
1. Auto-discovery and Weighting: Reads sign-in snapshots from the desktop client; accounts that have been idle longer receive higher weights. The top 5 accounts by weight are selected and then shuffled to avoid repeatedly selecting long-tail accounts.
2. Failover Mechanism: Supports session stickiness (the same conversation is bound to the same account), in-flight leases (the same account yields when concurrent requests exceed 2), and tiered cooldowns (429 and 5xx errors are counted separately).
3. Circuit Breakers and Budgets: Accounts that are repeatedly rejected are removed from the pool for 30 minutes (credential circuit breaker); accounts whose balance falls below the threshold are skipped automatically and rejoin automatically after recovery.
Model Catalog¶
Fetches the model list from upstream in real time and marks statuses.
* Status Markers: Displays models with “no available accounts” and models with “unknown cost.”
* Catalog Refresh: Supports a retry mechanism to handle network instability.
* Output Limits: Detects silent max_tokens limits imposed by the gateway.
Credit Automation¶
Provides a set of automated tasks that run at specific times by default:
* Daily Check-in: Claims the day’s check-in credits.
* Activity Reporting: Reports activity status.
* Task Rewards: Enrolls in and claims task rewards.
* Consecutive Login Rewards: Redeems consecutive login tiers and runs lottery draws.
* Cat Travel: Starts the journey and claims rewards.
* Missed Run Catch-up: Tasks missed while the app was closed are run immediately after startup.
* Revenue Ledger: Automatically resets across day boundaries and preserves data across restarts.
Request Observability¶
- Records: Logs timestamp, model, account, result, total latency, queue time, time to first token, token count, and rotation count.
- Statistics: Provides per-model queue duration (p50/p95), output speed (tok/s), and consumption ledger.
Interface¶
- Dual-Region Tabs: Accounts and credits for the domestic and international versions are separated.
- Collapsible Lists: Collapsed by default to reduce visual noise.
- Responsive Layout: Automatically stacks in narrow windows.
- Three-State Theme: Follows system / light / dark.
- One-Click Clear: Clears cooldowns, circuit breakers, and per-model cached statuses.
Protocol Compatibility¶
The pool externally supports three protocols simultaneously:
* OpenAI Chat (/v1/chat/completions)
* OpenAI Responses (/v1/responses)
* Anthropic Messages (/v1/messages)
Compatible with DSH core, Codex, Claude Code, and various SDK clients.
Installation and Enablement¶
1. Install¶
Clone the repository into DSH’s profile directory:
git clone https://github.com/2861292267/DSH-Official-WorkBuddy-Credit-Proxy.git \
~/.dsh/profiles/desktop/node_modules/dsh-rotakit
2. (Optional) Install QR Code Dependency¶
Used for QR code fallback login (only needed when upstream does not return an authUrl):
cd ~/.dsh/profiles/desktop/node_modules/dsh-rotakit && npm i qrcode
3. Configure and Enable¶
In the DSH profile’s package.json, ensure that "dsh-rotakit" is included in dsh.profile.bundles.
Restart DeepSeek Harness. The model selector will show the WorkBuddy XD Pool group.
Notes¶
- No Hot Reload: Host plugins do not hot reload. You must completely exit and restart the app after modifying source files in the
libdirectory; otherwise, running instances will continue to use the old code. - Credential Source: The plugin reads desktop client credentials; web-based logins are not read.
- License: Based on the upstream MIT license.
Use Cases¶
Suitable for DSH users who need to use multiple WorkBuddy / CodeBuddy accounts simultaneously for load balancing or credit management, as well as developers who need to access the same account pool through OpenAI / Anthropic protocols.