xiaozhe7772222/dsh-api-key-pool

Plugin插件 Native原生 ⭐ 6 MIT Dev Workflow开发与代码工作流

DeepSeek Harness 的 API 密钥轮换池:多密钥轮询、401/403/429 故障转移、冷却与恢复、Web UI 管理面板

Project Overview项目介绍

This is a native API key rotation pool plugin built exclusively for DeepSeek Harness (DSH), the official agent framework from DeepSeek. It enables round-robin rotation across multiple API keys assigned to the same LLM provider, and automatically fails over to a healthy key when the current key returns errors like 401, 403, or 429. Failed keys are placed into an exponential backoff cooldown, and will automatically rejoin the rotation pool once their cooldown period expires. The plugin also adds a dedicated web management panel accessible through DSH’s web UI settings menu.

The plugin is designed for DSH users who manage multiple API keys to spread out request load and avoid running into unexpected rate limits during agent workflows. Users can configure the plugin in two different, flexible ways. First, they can add a static preconfiguration via the cordis.patch.yml file, where they can declare key pools for each provider, set custom cooldown times, and adjust other core parameters. Alternatively, after launching DSH, users can dynamically add, remove, and check the health status of keys directly via the built-in web management panel.

The plugin requires Node.js version 18 or higher to work correctly, and it is released under the permissive MIT open source license, meaning users can freely use, modify, and distribute it without any legal restriction. Any keys added via the web panel are automatically persisted to a local pool-config.json file, so they will remain available across DSH restarts. Users are explicitly warned not to commit their actual API keys to public code repositories, and installation requires manually cloning the repository and copying files to DSH’s local plugins directory.

这是专为DeepSeek Harness(DSH)开发的原生API密钥轮换池插件,核心功能是为同一服务商提供多API密钥轮询负载均衡,当密钥遇到401、403、429等错误时会自动切换到下一个健康密钥,失败的密钥会进入指数退避冷却期,冷却结束后自动重新加入轮换池,还内置了可在DSH网页端设置中直接访问的Web管理面板。

该插件适合需要使用多个API密钥分散请求压力、避免触发速率限制的DSH用户。用户可以选择两种配置方式:一种是通过cordis.patch.yml预填写静态配置,声明各个服务商的密钥池、冷却时间等参数;另一种是启动DSH后在Web管理面板动态添加、移除密钥,查看密钥健康状态。

该插件要求Node.js版本不低于18,遵循MIT开源许可证,可免费使用修改和分发。通过Web面板添加的密钥会自动持久化到pool-config.json文件,重启DSH后不会丢失。需要注意不要将真实API密钥提交到公开代码仓库,安装时需要手动克隆代码并复制到DSH的插件目录。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 6 stars - very few users, little community feedback星标只有 6,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add github:xiaozhe7772222/dsh-api-key-pool

把 xiaozhe7772222/dsh-api-key-pool 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-api-key-pool

API Key 轮换池插件 · API Key Rotation Pool Plugin for DeepSeek Harness (DSH)

🐧 Designed & built by 小哲 (@xiaozhe7772222)

License: MIT DSH Node Author

多 Key 自动轮换 · 失败自动切换 · 冷却恢复 · Web 管理面板

Multi-key round-robin · Automatic failover · Cooldown & recovery · Web UI panel


English | 中文


English

✨ Features

Feature Description
🔄 Round-robin rotation Multiple keys per provider, rotated per request for load balancing
🛡️ Automatic failover Key fails with 401 / 403 / 429 → automatically marked unhealthy, next key takes over
⏱️ Cooldown & recovery Failed keys enter exponential-backoff cooldown (30s default), auto back in rotation when expired
🌐 Web management panel DSH Web UI → Settings → Plugins → API Key Pool: add/remove keys, view health, reset cooldowns
🔒 Key masking REST API only exposes masked keys (sk-abc****1234), never full secrets
💾 Persistent config Keys added via Web UI persist to pool-config.json, survive restarts

📦 Installation

# Clone the repo
git clone https://github.com/xiaozhe7772222/dsh-api-key-pool.git
cd dsh-api-key-pool

# Copy into your DSH profile's plugins directory
mkdir -p ~/.dsh/profiles/web/plugins/dsh-api-key-pool
cp -r lib package.json cordis.patch.yml ~/.dsh/profiles/web/plugins/dsh-api-key-pool/

Then declare the bundle in ~/.dsh/profiles/web/package.json:

{
  "dsh": {
    "profile": {
      "bundles": [
        {
          "name": "dsh-api-key-pool",
          "platform": ["web"],
          "optional": false
        }
      ]
    }
  }
}

Restart DSH:

npx @deepseek-ai/dsh web

⚙️ Configuration

Option 1: Static config via cordis.patch.yml

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-session-cleaner 下一个 Next dsh-go →