← Back to Skills Marketplace
halfmoon82

Model Failover Doctor

by halfmoon82 · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
387
Downloads
0
Stars
3
Active Installs
1
Versions
Install in OpenClaw
/install model-failover-doctor
Description
Diagnose and fix OpenClaw "All models failed" errors by detecting invalid model IDs, provider mismatches, and session fallback issues with optional auto-repair.
Usage Guidance
This tool appears to do what it says: diagnose and optionally auto-fix failover config problems by reading/writing OpenClaw config files and restarting the gateway. Before running with --fix (or --restart): 1) run the script with --dry-run first to preview changes; 2) inspect the generated backups under ~/.openclaw/workspace/.lib/.mfd_backups/ so you can restore if needed; 3) manually review the proposed edits to message-injector/index.ts and pools/session files to ensure they match your intended routing/overrides; 4) run fixes during a maintenance window since the gateway restart will affect availability. If you have concerns, you can open the script (model_failover_doctor.py) and the referenced files to verify behavior—there are no network calls or credential exfiltration signs in the provided code.
Capability Analysis
Type: OpenClaw Skill Name: model-failover-doctor Version: 1.0.0 The 'model-failover-doctor' skill performs high-risk administrative tasks, including automated patching of TypeScript source code (message-injector/index.ts) using regular expressions and the modification of core configuration files (pools.json, session_model_state.json). It also executes system commands via subprocess to restart the OpenClaw gateway. While these actions are aligned with the stated purpose of fixing model failover issues and the script includes a local backup mechanism, the automated modification of executable code and broad file system access constitute significant operational risks.
Capability Assessment
Purpose & Capability
The name/description match what the code and SKILL.md do: detect and repair failover issues by reading/writing OpenClaw config files (message-injector, pools.json, session_model_state.json) and creating backups. No unrelated credentials or binaries are requested.
Instruction Scope
SKILL.md and the script instruct reading and modifying files under ~/.openclaw (openclaw.json, .lib/pools.json, .lib/session_model_state.json and a message-injector index.ts). It also supports --dry-run, --fix, and --restart. These actions are in-scope for a failover repair tool, but note the script will read potentially sensitive configuration files and will write changes to these files when --fix is used (it creates timestamped backups first).
Install Mechanism
No install spec; the skill is instruction+script only. Nothing is downloaded from external URLs and no new binaries are installed.
Credentials
The skill requests no environment variables or external credentials. It operates on config files within ~/.openclaw, which is appropriate for a tool that repairs gateway/session configuration. Access to those files is necessary for its stated purpose.
Persistence & Privilege
The skill is not always-on and does not request elevated platform privileges. It modifies OpenClaw config/extension files (message-injector, pools/session state) and writes backups in its workspace area; this is expected for a repair tool. Autonomous invocation is allowed by default, but that is the platform norm and not a unique concern here.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install model-failover-doctor
  3. After installation, invoke the skill by name or use /model-failover-doctor
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release of "model-failover-doctor" skill: - Diagnoses and fixes the "All models failed" error in OpenClaw. - Provides clear trigger conditions for when to use the tool (e.g., identical model ID failures across providers, post-restart message failures, improper manual edits). - Supports diagnosis-only, auto-fix with gateway restart, and dry-run preview modes. - Includes a root cause quick reference table for common issues and auto-fix availability. - Details most frequent root cause (MI-1) and its resolution. - Ensures all auto-fixes are backed up for safety and manual recovery.
Metadata
Slug model-failover-doctor
Version 1.0.0
License
All-time Installs 4
Active Installs 3
Total Versions 1
Frequently Asked Questions

What is Model Failover Doctor?

Diagnose and fix OpenClaw "All models failed" errors by detecting invalid model IDs, provider mismatches, and session fallback issues with optional auto-repair. It is an AI Agent Skill for Claude Code / OpenClaw, with 387 downloads so far.

How do I install Model Failover Doctor?

Run "/install model-failover-doctor" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Model Failover Doctor free?

Yes, Model Failover Doctor is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Model Failover Doctor support?

Model Failover Doctor is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Model Failover Doctor?

It is built and maintained by halfmoon82 (@halfmoon82); the current version is v1.0.0.

💬 Comments