dsh-go-rotator: OpenCode Go Subscription Key Rotation for DeepSeek Harness
dsh-go-rotator is an open-source plugin designed for DeepSeek Harness (dsh), aimed at addressing the management challenges of multiple OpenCode Go subscription keys. It provides load balancing, automatic rotation, and quota management features, resolving active keys at request time via `apiKeyEnv` to distribute load. When encountering rate limiting, quota exhaustion, or authentication errors, the plugin automatically cools down the current key and switches to other available keys to ensure service continuity. Additionally, the plugin supports cost estimation based on tokens, records rolling window and long-term ledger data, and allows monitoring of status through a web interface or local API. Its built-in quota watchdog can fetch real-time data from the Dashboard and automatically disable keys when thresholds are breached. The plugin stores self-contained data in a local `data/` directory, ensuring key security without writing to logs.
Read More