dsh-api-heal
监听凭据失败并调用续期入口,自动修复无效API密钥。 用于解决API密钥失效问题。适合使用特定上游渠道、需要自动维护接口可用性的用户。
安裝
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:YSwo-fei/dsh-api-heal說明文件
閱讀完整 README ↗配置(profile cordis.patch.yml 里可覆盖)
| 键 | 默认 | 说明 |
|---|---|---|
enabled | true | 总开关 |
autoHeal | true | 关掉就只剩手动 heal_api |
cooldownMs | 60000 | 两次自动自愈之间的最短间隔,防抖 |
requestTimeoutMs | 30000 | 单次上游调用超时 |
webBaseUrl | "" | 留空则依次用 webServer.port/host → $DSH_WEB_URL → http://127.0.0.1:19387 |
registerRoutes | true | 是否开状态路由 |
例如在 profile 的 cordis.patch.yml 末尾加:
- id: api-heal
name: dsh-api-heal
config:
cooldownMs: 15000
autoHeal: true