DeepSeek Harness plugin

llm-fallback

Multi-level provider fallback for same-named models in the DeepSeek Harness

Jump to install

Source facts

Repository
CanGeng/llm-fallback
Latest update
Aug 16, 2026
Category
Models & Providers
GitHub stars
0
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/CanGeng/llm-fallback
Plugin: llm-fallback
Author: CanGeng

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only
README language

llm-fallback

English | 中文

Multi-level provider fallback for same-named models in the DeepSeek Harness.

A pool maps one model id to an ordered provider list. The first provider is the primary; each later one is a fallback. The plugin keeps every step on the primary (stable request prefix → KV cache reuse) and only fails over when the current level is exhausted.

Behavior

  • agent/request picks the pool level for each step. A new step starts at the

primary (level 0) unless the explicitly requested provider is itself a pool member — then it starts there and fails over forward. A recovered primary is therefore reused immediately on the next step. It also probes each candidate with resolveCallConfig and skips (recording) any that would fail before streaming — a missing route (NO_ADAPTER), an unknown model, or an unsupported reasoning effort.

  • agent/request-error records each level's failure, then advances the level by

returning { kind: 'retry' }. When every level is exhausted it throws one aggregated error listing each level's failure (provider: code — message).

Same-provider retries happen first (via dsh-llm-retry, which sits outside this plugin), so transient errors like RATE_LIMIT never trigger a failover and never break the prefix. Only terminal errors (QUOTA, AUTH, …) or an exhausted retry budget fail over.

retryPolicy.mode: always is incompatible

always retries one provider forever and cannot be stopped from a listener, so it conflicts with a terminating fallback chain:

  • alwaysPolicy: reject (default) — refuse the provider, naming it and the

model. Providers registered at load time are rejected when the plugin loads; routes activated later through settings (dormant routes) are rejected the first time a pool request would use them.

  • alwaysPolicy: degrade — warn and cap that provider at alwaysMaxRetries

same-provider retries before failing over.

In both modes, an always provider may never be the last level of a pool (that can never terminate) — it is always rejected.

Configuration

See cordis.patch.yml. The pools list maps a model id to its ordered provider chain. The config is validated when the plugin loads: an unknown alwaysPolicy, a pool without a non-empty model, or a pool whose providers is not an array throws immediately instead of failing silently later.

config:
  alwaysPolicy: reject
  alwaysMaxRetries: 2
  pools:
    - model: deepseek-v4-pro
      providers: [deepseek-official, ark-coding, ark-agent]

Development

node --test   # or: npm test

Install

dsh plugin --profile web add link:/path/to/llm-fallback
dsh web   # restart to load the new bundle layer