ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified ai models Safety 4/5

openclaw-model-failover

OpenClaw plugin: auto-detect rate limits/quota/auth failures and switch sessions to fallback LLMs. Prevents 'API rate limit reached' loops by patching pinned session models.

Why use this skill?

Prevent LLM downtime with the OpenClaw model-failover plugin. Automatically switch providers on rate limits or API errors to keep your agent workflows running.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/homeofe/openclaw-model-failover
Or

What This Skill Does

The openclaw-model-failover plugin acts as a resilient middleware layer for the OpenClaw Gateway. Rather than allowing your workflow to crash or stall when an LLM provider hits a bottleneck, this plugin intelligently monitors outbound API requests. When it detects HTTP 429 (Rate Limit), RESOURCE_EXHAUSTED errors, or specific authentication and scope failures, it intervenes by dynamically patching the session's pinned model. By maintaining a user-defined fallback hierarchy, the plugin ensures that tasks automatically migrate to secondary or tertiary providers (e.g., switching from Anthropic to OpenAI) without the user needing to manually intervene or restart the conversation flow.

Installation

There are two primary methods to integrate this plugin into your OpenClaw environment:

Option A: ClawHub (Recommended)

For production environments and easy management, use the ClawHub registry: clawhub install openclaw/skills/skills/homeofe/openclaw-model-failover

Option B: From Repository (Development)

For developers modifying the source code or testing new configurations:

  1. Clone the repository from openclaw/skills.
  2. Navigate to your local workspace directory.
  3. Run openclaw plugins install -l ~/.openclaw/workspace/openclaw-model-failover.
  4. Execute openclaw gateway restart to apply the plugin registration.

Use Cases

This plugin is essential for high-volume automation tasks. It is particularly valuable for long-running agents that process large datasets, where hitting a quota limit could otherwise result in data loss or incomplete execution. It is also ideal for developers building cross-model applications who want to provide a seamless user experience despite fluctuating API stability across different LLM vendors.

Example Prompts

  1. "Draft a summary of these 50 meeting transcripts, failover to GPT-4 if Claude 3.5 Opus rate limits occur."
  2. "Analyze this financial data CSV and use the failover plugin to ensure uninterrupted processing if the primary API scope fails."
  3. "Execute the research pipeline; if the Google Gemini API returns a 429 status, pivot automatically to OpenAI for the remainder of the session."

Tips & Limitations

  • Config Ordering: Always list your primary model at the top of the hierarchy. If a secondary model is significantly more expensive, be mindful that automatic failover will increase your total cost per request.
  • Authentication: Ensure that all fallback models are correctly configured within your OpenClaw gateway credentials. The plugin cannot switch to a model if valid API keys for the failover target are not present in your environment.
  • Limitations: The plugin performs best with stateless requests. While it attempts to preserve conversation context, switching models mid-conversation may occasionally lead to slight variances in tone or formatting depending on how different models handle system prompts.

Metadata

Author@homeofe
Stars2387
Views1
Updated2026-03-09
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-homeofe-openclaw-model-failover": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#llm#failover#resilience#gateway#automation
Safety Score: 4/5

Flags: external-api