OpenClaw Model Failover Plugin for Openclaw

A gateway-level plugin that automatically switches to fallback LLM models when primary APIs hit rate limits or encounter quota errors.

homeofe
v0.2.1
Mar 3, 2026
0
0
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install openclaw-model-failover

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install openclaw-model-failover using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is OpenClaw Model Failover Plugin?

The OpenClaw Model Failover plugin is a critical infrastructure component designed to enhance the reliability of AI agents. Rather than being a standalone agent skill, it functions as an OpenClaw Gateway plugin that monitors session health in real-time. It specifically targets common points of failure such as HTTP 429 rate limits, quota exhaustion, and authentication scope errors, ensuring that your Openclaw Skills never get stuck in failure loops.

By dynamically patching pinned session models, this plugin allows for seamless transitions between providers like Anthropic, OpenAI, and Google. This ensures that even if one provider faces an outage or a specific API key hits its limit, the underlying workflow continues without manual intervention, making it a cornerstone for production-grade Openclaw Skills deployment.

OpenClaw Model Failover Plugin Use Cases

  • Preventing 'API rate limit reached' loops during high-concurrency agent tasks.
  • Maintaining service continuity when a specific LLM provider experiences regional outages.
  • Automatically bypassing quota exhaustion by shifting traffic to secondary providers.
  • Handling specific authentication or scope failures (e.g., missing specific write permissions) by falling back to a more permissive model environment.

How OpenClaw Model Failover Plugin Works

  1. The plugin sits at the gateway layer, intercepting responses from LLM providers during active sessions.
  2. It monitors for specific error triggers such as HTTP 429 (Rate Limit) or RESOURCE_EXHAUSTED codes.
  3. Upon detecting a failure, the plugin identifies the next available model based on a user-defined fallback priority list.
  4. It automatically patches the pinned model metadata for that specific session.
  5. The gateway retries the request using the fallback model, ensuring the user or agent receives a successful response without restarting the workflow.

OpenClaw Model Failover Plugin Setup

Integrating this plugin into your Openclaw Skills environment is straightforward. You can install it via the central hub or manually from a local repository.

Option A: ClawHub Installation

clawhub install openclaw-model-failover

Option B: Local Development Installation

openclaw plugins install -l ~/.openclaw/workspace/openclaw-model-failover
openclaw gateway restart

OpenClaw Model Failover Plugin Data Schema & Taxonomy

The plugin manages failover logic through a structured configuration block that defines the hierarchy of LLM providers.

Attribute Type Description
fallback_order Array A prioritized list of providers (e.g., ["anthropic", "openai", "google"]).
trigger_codes Array List of HTTP or gRPC error codes that initiate a switch.
session_id String The unique identifier of the session being patched with a new model.
model_patch Object The updated model metadata applied to the session context.

OpenClaw Model Failover Plugin Advanced Features

  • Multi-provider chaining: Configure complex fallback sequences across different LLM families.
  • Real-time session patching: Update model assignments on-the-fly without losing conversation context.
  • Auth error detection: Identify specific scope failures (like missing write permissions) to trigger switches.
  • Seamless gateway integration: Works silently in the background to improve the resilience of all your Openclaw Skills.

SKILL.md


Loading

Related Openclaw Skills

Featured*