echo-xianyu/dsh-go-rotator ↗★ 3

dsh-go-rotator

OpenCode Go subscription key rotator for DeepSeek Harness (dsh): per-request active-key routing, 429/quota cooldown rotation, cost accounting, dashboard quota scraping, and a web GUI settings section. Self-contained data dir under the plugin install folder — no machine-specific paths. 适合持有多个OpenCode Go密钥、需自动轮换与配额管理的用户;含Web设置界面。

Package
dsh-go-rotator
Compatibility
Unverified
Harness peer range
^0.1.0-rc.6
Cordis peer range
^4.0.1
Version
0.2.0
License
MIT
Last updated
Aug 14, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:echo-xianyu/dsh-go-rotator

1. 配置 provider 路由($DSH_HOME/settings.yaml)

⚙️ 配置

profile cordis.patch.yml 或 --patch 覆盖行 go-rotator:

键默认说明
stateFile/data/opencode-go-rotator.json状态文件(keys、冷却、轮换日志、用量窗口;支持 ~/ 与相对路径)
statsFile状态文件中的 statsFile(默认 /data/opencode-go-rotator-stats.json)长期账本
apiKeyEnvGO_ROTATOR_ACTIVE_KEYprovider 每请求解析的 env 引用
cooldownMinutes60出错 key 的冷却分钟数
disableThresholdPercent97配额使用率阈值,越过即禁用该 key
rotateOnCodesRATE_LIMIT, QUOTA_EXCEEDED, AUTH, INVALID_CREDENTIAL触发轮换的 LlmError 码
rotateDebounceMs3000并发失败时的轮换防抖
scrapeIntervalMs300000dashboard 配额抓取间隔;0 关闭
guiPort7777GUI/API 端口;0 关闭(被占用时自动 +1 回退)