morphlinglan/dsh-llm-fallback0

dsh-llm-fallback

Provider/model fallback chain plugin for DeepSeek Harness — when the current model fails with an eligible error code (e.g. RATE_LIMIT or QUOTA), the agent loop automatically retries with the next provider/model in the configured chain.

AI 분석

核心用途是在大模型请求遇到限流(RATE_LIMIT)或额度不足(QUOTA)等错误时,自动无缝切换到备用模型重试。适合对 Agent 运行稳定性要求极高的生产环境。

패키지
dsh-llm-fallback
버전
1.0.0
최근 업데이트
2026. 8. 16.

설치

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:morphlinglan/dsh-llm-fallback

Usage

Add an insert entry to the profile's cordis.patch.yml (or rely on the bundle default and configure it through your profile patch layer):

- insert:
    - id: dsh-llm-fallback
      name: dsh-llm-fallback
      config:
        codes:
          - RATE_LIMIT
          - QUOTA
        scope: turn
        fallbacks:
          # Replace these with your own backup providers/models.
          - provider: backup-provider-a
            model: backup-model-a
          - provider: backup-provider-b
            model: backup-model-b

The providers/models above are placeholders only. Replace them with providers and models you actually have access to.

Config

FieldTypeDefaultDescription
codesstring[]["RATE_LIMIT", "QUOTA"]Failure codes that trigger a fallback.
fallbacks{ provider, model }[][]Ordered chain of backup providers/models.
scope"step" | "turn" | "session""turn"How long the sticky fallback selection persists.

Scope behavior

  • step: each step starts on the primary model; only retries within one step walk the chain.
  • turn: once a fallback is selected, it is reused for the rest of the current turn; the next turn tries the primary again.
  • session: once a fallback is selected, it stays selected until the chain is exhausted; best when the primary is durably down.