DSH Plugins Marketplace

DSH Plugins

Plugins

/

Models & Providers

/

dsh-model-rotation

C

dsh-model-rotation

Identified

Ordered model rotation for the DSH model picker: a rate-limited or repeatedly timing-out member hands over to the next one, members that only timed out are retested once, and the DSH platform model is

dsh-model-rotation

npm

自定义模型自动切换 / Custom model rotation with automatic failover — for DeepSeek Harness.

Define an ordered chain of models. When a member is rate-limited, or times out more than timeoutThreshold times, the tour moves to the next member. When no third-party member is left, it goes back and re-tests the models that timed out in the first round. Finally the DSH platform model catches everything.

  • Ordered failover — pick any models you have configured, in the order you want them tried.
  • Rate limit → switch immediately; timeouts are counted per model and only switch past the limit.
  • Retest round — models that merely timed out get a second chance before the chain is exhausted.
  • DSH platform fallback — a platform model of your choice (e.g. deepseek-account/deepseek-flash) is the last resort, and it is sticky: it does not jump back the moment a third-party route revives.
  • Picks up in the model picker — every saved chain is published as a model under the 「模型自动切换」 provider, so you select it like any other model. Selecting anything else leaves your requests completely untouched.

Install

dsh plugin --profile <your-profile> add dsh-model-rotation

Then restart DSH. To install from this repository instead:

dsh plugin --profile <your-profile> add github:Chrono-rigger/dsh-model-rotation

The plugin needs a DSH that ships the agent/request and agent/request-error waterfall events (0.2.x and newer).

Use

  1. Open Settings → 模型自动切换 (or the plugin's own page under Plugins).
  2. 新建组合, type a name, and add members — the picker searches by model id or name. Reorder with ↑/↓; the order is the failover order.
  3. Optionally pin a DSH 兜底模型 — the platform model used when the whole chain is exhausted.
  4. 保存组合, then pick the chain by name in the model picker.

The card list shows every saved chain with its members, per-chain timeout limit, and whether it is currently usable. A member whose provider has no adapter in this installation is flagged 「当前不可用」 and skipped by the tour instead of failing your request.

Per-chain settings

SettingMeaning
超时上限How many timeouts one member may hit before the tour moves on. 0 switches on the first one.
短时限流原地重试Off by default. When on, a 429 that states a short wait is retried on the same model instead of switching away at once — useful for providers that already rotate accounts behind one route. Quota exhaustion always switches immediately.
最长等待 / 原地重试次数The wait ceiling (ms) and how many in-place retries one route gets before it is marked dead.

Tools

The agent can drive the same state:

  • model_rotation_catalog — every provider/model pair available in this installation
  • model_rotation_set — replace the active chain's members
  • model_rotation_status — chains, live per-agent phase, decision log
  • model_rotation_reset — forget failures and start the tour over

State machine

round1   members in order
           rate limit / quota   → marked dead, move on
           timeout              → count++, move on after the per-chain limit
           no adapter / auth    → marked dead, move on
              ↓ all members dead or exhausted
retest   members that only timed out in round1, fresh timeout budget
              ↓ exhausted
fallback DSH platform model (pinned or auto-discovered) — sticky

Failures the plugin does not own (SERVER, TRANSPORT, EMPTY_RESPONSE, …) are handed back to the harness's own retry policy untouched.

Runtime state lives in ~/.dsh/model-auto-switch-state.json (or $DSH_HOME), and is best-effort: a broken file falls back to the plugin config instead of failing the boot.

About 「自动识图」

The harness registers a -vision twin for every provider that supports image input; those twins list the same models and only differ in accepting images. The picker hides them by default — turn on 显示「自动识图」变体 if you want to add one. For everyday text work use the plain entry (cheaper, same context); add the vision twin only when you actually send images.

Compatibility with provider-level rotation

The plugin rewrites the route at the agent/request waterfall, which runs before the adapter is bound. A member that itself rotates accounts behind one provider id (WorkBuddy, free-model pools, …) therefore keeps that behaviour — its own failover runs first, and only a failure of the whole pool reaches this plugin.

License

MIT

Comments

Loading…

Similar plugins

dsh-model-rotation

by ZhouXuan-Yu

Multi-source model rotation plugin for DeepSeek Harness — group models by source, order them (manual/auto), preset model + reasoning effort, auto-failover when quota runs out, and see which model actually answered.

Models & ProvidersManifest valid

★ 0

MIT

JavaScript

Oct 31, 2026

dsh plugin --profile web add dsh-model-rotation

automatically set reasoning efforts for self-defined models in Deepseek Harness

Models & ProvidersManifest valid

★ 0

MIT

JavaScript

dsh plugin --profile web add dsh-reasoning-adapter

by QGG4588

DSH 模型故障自动转移 · provider-pool failover: on rate limit/quota/timeout, auto-retry with the next untried model from the selected providers' full model pools. Runtime tool: model_failover + Web UI panel.

Development & InfrastructureModels & ProvidersManifest valid

★ 1

MIT

JavaScript

Oct 22, 2026

dsh plugin --profile web add dsh-model-failover

One-click enable/disable switch for every model provider in DeepSeek Harness - disabled providers leave the model picker. DSH 模型提供商一键开关:在「设置 → 模型」每行「编辑」左侧放一个开关,关掉即从模型选择栏消失。

Terminal & ClientsModels & ProvidersManifest valid

★ 0

MIT

JavaScript

dsh plugin --profile web add dsh-provider-toggle

by mengge237

DSH 插件:自定义模型/提供方顺序——侧边栏拖拽排序,宿主的模型列表按这份顺序返回;顺序写进 settings.yaml 前自动备份

Tools & CapabilitiesDevelopment & InfrastructureTerminal & ClientsModels & ProvidersManifest valid

★ 1

MIT

JavaScript

Oct 22, 2026

dsh plugin --profile web add dsh-model-priority

by WaveBird

Fallback model chains for DeepSeek Harness: global defaults, per-Session overrides, and a model-menu switch card.

Manifest valid

★ 0

MIT

JavaScript

Nov 11, 2026

dsh plugin --profile web add dsh-fallback-models