Intelligent Model Router for Openclaw

An automated model routing skill that dynamically switches between Claude Sonnet 4.5 and Opus 4.6 based on task complexity to balance cost and quality.

sa9saq
v1.0.0
Feb 11, 2026
0
0
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install rey-model-router

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 rey-model-router 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 Intelligent Model Router?

The Intelligent Model Router is a specialized enhancement for AI coding agents within the Openclaw Skills ecosystem. It acts as an intelligent traffic controller, analyzing user prompts to determine whether a task is routine or complex. By defaulting to Claude Sonnet 4.5 for daily operations and escalating to Opus 4.6 only when high-level reasoning or complex coding is required, it ensures maximum output quality without unnecessary expenditure.

Beyond simple routing, this skill includes a robust fallback mechanism. If an agent hits subscription rate limits (such as 429 Too Many Requests errors), the router automatically switches to a backup API key, ensuring uninterrupted workflow for professional developers and teams.

Intelligent Model Router Use Cases

  • Developing complex Google Apps Script (GAS) or business automation tools that require Opus-level reasoning.
  • Generating routine social media content, summaries, and daily correspondence using cost-effective models.
  • Performing system architecture design and security audits where precision is critical.
  • Managing high-volume workflows by automatically falling back to API usage when subscription limits are reached.

How Intelligent Model Router Works

  1. The AI agent intercept every user request to analyze complexity and scan for specific trigger keywords.
  2. If keywords related to implementation, debugging, or system design are detected, the skill prepares to escalate the model.
  3. For tasks without clear keywords, the agent performs a self-evaluation on a scale of 0-10 based on code length and reasoning depth.
  4. If the task scores a 7 or higher, the agent executes the /model anthropic/claude-opus-4-6 command.
  5. During operation, the skill monitors for rate limit messages and triggers an automatic fallback to an API backup if the subscription is exhausted.

Intelligent Model Router Setup

To integrate this routing logic into your environment, configure the following environment variables in your terminal or configuration file:

# Set your backup API key for rate limit fallback
export ANTHROPIC_API_KEY_BACKUP="sk-ant-..."

# Enable the fallback functionality
export SUBSCRIPTION_FALLBACK_ENABLED=true

# Configure reset intervals (in hours or days)
export SUBSCRIPTION_RESET_HOURS=6

Once configured, the Openclaw Skills router will operate automatically in the background.

Intelligent Model Router Data Schema & Taxonomy

The Intelligent Model Router tracks the following metadata to optimize model selection and cost reporting:

Attribute Type Description
Active Model String The current LLM being utilized (Sonnet 4.5 or Opus 4.6).
Complexity Score Integer Internal 0-10 score based on reasoning requirements.
Fallback Status Boolean Indicates if the agent is currently using the backup API key.
Estimated Cost Float Tracks USD expenditure during API fallback sessions.

Intelligent Model Router Advanced Features

  • Keyword-based auto-triggering for specific languages (Japanese/English) and technical frameworks.
  • Multi-tier rate limit detection (429 errors, usage limit messages) with automated 6-hour or 7-day reset timers.
  • Manual override commands allowing users to force specific modes via /mode subscription or /mode api.
  • Proactive cost tracking that notifies the supervisor when switching to API-based billing to prevent budget overruns.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*