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.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/homeofe/openclaw-model-failoverWhat 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:
- Clone the repository from
openclaw/skills. - Navigate to your local workspace directory.
- Run
openclaw plugins install -l ~/.openclaw/workspace/openclaw-model-failover. - Execute
openclaw gateway restartto 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
- "Draft a summary of these 50 meeting transcripts, failover to GPT-4 if Claude 3.5 Opus rate limits occur."
- "Analyze this financial data CSV and use the failover plugin to ensure uninterrupted processing if the primary API scope fails."
- "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
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 skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-homeofe-openclaw-model-failover": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: external-api
Related Skills
openclaw-ops-elvatis
Operational commands - dashboards, monitoring, and management for OpenClaw deployments.
openclaw-memory-docs
OpenClaw plugin for documentation-grade memory: explicit capture + local searchable store with safe redaction.
openclaw-memory-core
Core utilities for OpenClaw memory plugins (redaction, local store, embeddings).
openclaw-ispconfig
Manage ISPConfig servers: automated site provisioning, domains, mailboxes, DNS, databases, SSL, backups, and more.
openclaw-rss-feeds
RSS/Atom feed digest with optional CVE enrichment, Ghost CMS drafts, and channel notifications