lokic7123-star/dsh-route-resilience ↗★ 0
dsh-route-resilience
DSH 多路由高可用、故障隔离与可观测性插件,支持限流自动漂移与指数退避隔离
AI 分析
核心用途是在 API 遇到限流(429)、网络错误或配额不足时,自动在备用渠道间无缝切换。适合对模型调用稳定性要求极高、拥有多个 API 渠道的用户。
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:lokic7123-star/dsh-route-resilience说明文档
阅读完整 README ↗Configuration
Settings namespace
The plugin reads its configuration from the dsh-route-resilience settings namespace (hot-reloaded on save, no restart):
{
"groups": [
{
"id": "deepseek", // virtual provider name used as activeGroup
"targets": [
{ "provider": "opencode-go-1", "model": "deepseek-chat" },
{ "provider": "opencode-go-2", "model": "deepseek-chat" }
],
"retryableCodes": ["RATE_LIMIT", "TIMEOUT", "TRANSPORT"],
"quarantineBaseMs": 60000, // optional, default 60000
"quarantineCapMs": 300000 // optional, default 300000
}
],
"activeGroup": "deepseek" // optional; unset = pass-through
}
- Each
target.providermust reference a concrete provider route configured in your provider adapter (e.g.llm-pi-ai), each with its own credential reference. This plugin only swapsprovider/model; it never manages keys. retryableCodesdefaults toEMPTY_RESPONSE, RATE_LIMIT, SERVER, TIMEOUT, TRANSPORT.- When
activeGroupis undefined the plugin is installed but idle — routing passes through unchanged.
Web UI
A Route resilience panel is injected at the bottom of the Models settings page. It shows live health (active / quarantined / disabled with recovery countdown, chain-end fallback) and lets you add or remove keys, edit groups, error codes and quarantine parameters. Adding a key creates a provider route bound to a fresh credential reference; the key value is stored to the credential service on save.