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设置界面。
インストール
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:echo-xianyu/dsh-go-rotatorドキュメント
README 全文を読む ↗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) | 长期账本 |
apiKeyEnv | GO_ROTATOR_ACTIVE_KEY | provider 每请求解析的 env 引用 |
cooldownMinutes | 60 | 出错 key 的冷却分钟数 |
disableThresholdPercent | 97 | 配额使用率阈值,越过即禁用该 key |
rotateOnCodes | RATE_LIMIT, QUOTA_EXCEEDED, AUTH, INVALID_CREDENTIAL | 触发轮换的 LlmError 码 |
rotateDebounceMs | 3000 | 并发失败时的轮换防抖 |
scrapeIntervalMs | 300000 | dashboard 配额抓取间隔;0 关闭 |
guiPort | 7777 | GUI/API 端口;0 关闭(被占用时自动 +1 回退) |