DeepSHPlugins
dsh-llm-key-rotation 專案預覽
GITHUB / COMMUNITY PROJECT

dsh-llm-key-rotation

安全與運維TypeScriptMIT

在配額、速率限制或身份驗證失敗後輪換已配置的 LLM API 金鑰。

6 Starsm1khal3v 更新時間 2026-08-30
訪問 GitHub 倉庫
dsh-llm-key-rotation 專案預覽

專案介紹

中文

在配額、速率限制或身份驗證失敗後輪換已配置的 LLM API 金鑰。

English

Rotates configured LLM API keys after quota, rate-limit, or authentication failures.

專案資訊與收錄訊號

快照 2026-09-11
作者 / 組織
m1khal3v
倉庫
m1khal3v/dsh-llm-key-rotation
GitHub Stars
6
Forks
0
開發語言
TypeScript
許可證
MIT
最近推送
2026-08-30
Manifest
資料中檢測到宣告

公開倉庫不自動等於可商用;許可證與當前相容性以原專案文件為準。Manifest 和資料評分不構成安裝安全認證。

資料評分

60/ 100
維護活躍
93
文件與實用資訊
50
生態關注度
24
安裝便捷訊號
80
專案宣告訊號
100

近 12 天仍在更新;關注度尚低(6)。

評分來自已有資料快照的五維模型,僅作瀏覽參考,不是實際使用評測或安全檢測結論。

安裝與使用

所有專案資料與許可均以對應 GitHub 倉庫為準。

dsh plugin --profile web add @m1khal3v/dsh-llm-key-rotation

複製命令不會自動執行。請先閱讀倉庫文件,確認環境要求與許可證。

專案截圖

倉庫 README

GitHub 原文

已儲存的倉庫文件快照;文件抓取時間未記錄,可能與上方目錄介紹處於不同版本。安裝前請核對當前倉庫說明。

儲存庫檔案保留原文,指令與授權文字不作自動改寫。

npm

DeepSeek Harness

MIT License

dsh-llm-key-rotation

изображение

Seamless API-key rotation for DeepSeek Harness.
Hit a quota limit or 429 Rate Limit? The plugin swaps in the next key you configured and retries instantly — no restarts, no context loss, and zero interruptions.


⚡️ Highlights

  • 🔄 Invisible to Agent & User: Request fails with quota/rate limit → plugin hot-swaps the key → request retries and succeeds seamlessly.
  • 🎛 Native Web UI: List every key a provider can use and toggle rotation right inside Settings.
  • 🧠 Smart Anti-Spin: Cooldown discipline prevents infinite loops if all your keys are exhausted.
  • 🧼 Zero Core Patches: Plugs cleanly into the Harness recovery waterfall — safe to install, safe to remove.

🛠 How It Works

┌─────────────────┐          429 / QUOTA / AUTH          ┌──────────────────────┐
│  Model Request  │ ───────────────────────────────────► │  llm-key-rotation    │
└─────────────────┘                                      └──────────┬───────────┘
         ▲                                                          │
         │                  { kind: 'retry' }                       │ 1. Pick next key
         │             (Adapter re-resolves key)                    │ 2. Hot-swap env ref
         └──────────────────────────────────────────────────────────┘
  1. You keep working with your currently-active key as usual.
  2. If a request fails (QUOTA, RATE_LIMIT, or AUTH), the plugin loads the next key from your configured chain.
  3. The turn retries with the new key, and future requests continue with the working key.

🚀 Quick Start

1. Install the plugin

dsh plugin --profile web add @m1khal3v/dsh-llm-key-rotation

2. Configure via Web UI

Navigate to Settings → Plugins → Key Rotation:

  1. Toggle on rotation for your target provider.
  2. Select your trigger codes (default: QUOTA, AUTH).
  3. Click Add key, paste all the keys you want that provider to rotate through, and hit Save.

*(Keys are safely saved to the Harness credential store)*.


⚙️ Behavior & Good to Know

  • Smart Rotation Window (300s): During consecutive failures, the plugin walks forward through your configured keys. If no failures occur for >5 minutes, the chain resets to start from the top again.
  • Interplay with dsh-llm-retry:
  • QUOTA and AUTH rotate immediately.
  • RATE_LIMIT is handled by dsh-llm-retry first (with backoff). To rotate instantly on 429 errors instead, simply remove RATE_LIMIT from your provider's retryableCodes.
  • Live Terminal Logs: Watch rotation events in real time right in your dsh terminal:
  [llm-key-rotation] rotated provider="opencode-go" chain[0]→"OPENCODE_GO_API_KEY" (QUOTA)

*(Secret values are never logged — only provider names, indices, and error codes).*


🧑‍💻 Development

pnpm install
pnpm run verify    # typecheck + test
pnpm run build

📄 License

MIT

使用前核對

安裝步驟、相容版本與授權範圍以原專案當前文件為準。Stars 和評分是快照中的導航訊號。

安裝與排錯 · 專案問題反饋

同類專案