dsh-failover-continue: DSH Unified Auto-resume and Model Failover

Preface

When running long conversations or connecting a multi-provider model gateway in DeepSeek Harness (DSH), single-turn failures, rate limiting, authentication errors, or context length overflows are not uncommon. The common practice is to split “auto-continue” and “model failover” into two separate plugins, each maintaining its own resilience chain. This can easily scatter configuration and state, and the switching logic may even conflict with each other.

Below is an introduction to the community plugin dsh-failover-continue (maintained by elanski), which consolidates auto-continue and ordered fallback into a single plugin, using one failover-continue: namespace to configure the entire chain. The plugin is categorized as “model inference”; you can find documentation on the SkillHub catalog page and the GitHub repository. The catalog site is a community ecosystem site and has no official affiliation with DeepSeek / 幻方.

What This Is

dsh-failover-continue is an auto-continue + model failover combined plugin for DSH (as described in the README: Unified auto-continue + model failover plugin for DeepSeek Harness). The current package version is 0.1.0, licensed under MIT.

It addresses the following problem: when a request fails or a turn in a session is interrupted, instead of manually switching models or repeatedly clicking “continue”, the plugin switches routing according to the configured fallback chain, automatically continues at appropriate moments, and only stops when the entire chain becomes unavailable.

Core Features

The following capabilities are all drawn from the repository README, organized by responsibility.

Ordered Fallback and Circuit Breaking

  • Supports an ordered fallback chain (provider/model), with model-level + provider-level two-tier circuit breaking: the first failure opens that route (threshold 1), and the next request will leave the failed route.
  • If the provider returns Retry-After (e.g., the gateway indicates “retry in 3594s”), the plugin respects that interval instead of retrying after a fixed 60 seconds.

Authentication, Billing, and Context

  • 401/403 or billing-related 402 errors trigger a route switch rather than immediately ending the session; the stop-loss is only triggered when the entire fallback chain is open.
  • When encountering CONTEXT_WINDOW_EXCEEDED, it handles this at request granularity: oversized requests switch to candidate models with a larger context, without “stopping” the currently healthy route along with it.

Auto-Continue and Cold Sessions

  • Auto-continue for failed turns: combines real-time event streams with cold session scanning (orphan turns can still be woken up and continued even after a host restart).
  • Includes adaptive backoff and loop guards; safety valves include maxSwitchesPerStep (limits the number of switches per step along the chain) and maxConsecutive (limits consecutive continue storms).

Session Logs and Settings UI

  • Session log safety: the plugin does not write custom event types (Session.append cannot carry an ignorable flag); switch notifications are presented as regular user/message lines, with state stored in the status route and settings namespace.
  • The settings card is bilingual Russian/English (RU/EN), with strings managed via a locale dictionary; the plugin registers a ru language pack (DSH’s built-in ones are generally zh/en).

Installation and Activation

The plugin runs with the current dsh process permissions; before installing, review the source code and the MIT license (as well as the acknowledgments in NOTICE.md).

Installation Command

The method given in the official README is a local link or a GitHub placeholder (replace with your own fork/path):

dsh plugin --profile web add link:/path/to/dsh-failover-continue
# or: dsh plugin --profile web add github:<you>/dsh-failover-continue

Replace Old Plugins and Migrate

Only one owner should exist for the same waterfall logic. Before enabling this plugin, you should disable the plugins it replaces, migrate settings, and restart the host:

node scripts/migrate-settings.mjs --apply

Disabling examples in ~/.dsh/profiles/web/cordis.patch.yml (as in the README):

# ~/.dsh/profiles/web/cordis.patch.yml
- id: auto-continue
  disabled: true
- id: model-failover
  disabled: true
- id: model-failover-settings
  disabled: true

Configuration Entry Point

Use the single namespace failover-continue: in settings.yaml. It can be edited under Settings → Plugins → Failover + auto-continue, including ordered fallbacks (provider/model), tripCodes, thresholds and cooldown, continue messaging and timing, backoff, and loop guard, etc. For full requirements and design, refer to the design repository path .kiro/specs/failover-continue/ (the README points there, not a file listing within this repository).

Typical Usage and Verification

  1. Install as described above and disable auto-continue, model-failover, and model-failover-settings.
  2. Run node scripts/migrate-settings.mjs --apply to migrate old configurations.
  3. Configure the fallback chain and continue policies under failover-continue: in the settings UI or settings.yaml.
  4. After restarting the DSH host, observe whether routing switches and auto-continue work as expected in scenarios with an unstable model gateway or single-turn interruptions.

Developers can run the following self-checks within the repository:

npm run typecheck && npm test && npm run build

Use Cases and Notes

Who it’s for: Developers already connecting multiple providers/models on the DSH web profile who want one chain to manage both failover and continue; deployment environments needing a RU/EN settings UI can also directly use this language pack.

Notes:

  • Do not enable it alongside standalone auto-continue / model-failover plugins, to avoid duplicate waterfall handling.
  • Configuration items are based on the README and the .kiro/specs/failover-continue/ design documents; this article does not list YAML fields one by one to avoid inconsistency with version drift.
  • The community catalog currently shows 0 stars (as displayed on the catalog page); before choosing, it is recommended to read the source code and tests (tests/ includes circuit, config, walk, idle, stepup, policy, doctor, etc.).

Conclusion

dsh-failover-continue consolidates “switch models and keep running” and “automatically continue failed turns” in DSH into a single configurable resilience circuit, while also handling edge cases such as Retry-After, authentication/billing switching, and context length overflow. For installation instructions and the latest changes, please refer to the repository README.

  • Catalog page: https://www.skillhub.cn/plugins/elanski/dsh-failover-continue
  • GitHub: https://github.com/elanski/dsh-failover-continue
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye