Smart Model Router for Openclaw

An intelligent routing engine that classifies task complexity to select the most cost-effective AI model for Openclaw Skills agents.

jsgoecke
v0.1.0
Feb 16, 2026
1
1.4k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install openclaw-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 openclaw-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 Smart Model Router?

The Smart Model Router is a sophisticated orchestration tool designed to minimize LLM expenses by matching task requirements with the appropriate model tier. By analyzing indicators like reasoning depth, code complexity, and token length, it ensures that simple heartbeats stay on free tiers while reserving premium reasoning models for complex architectural design or formal logic. This skill integrates seamlessly into the Openclaw Skills ecosystem, providing a 60-90% reduction in API costs without sacrificing output quality.

Developers can leverage different optimization modes—Balanced, Aggressive, or Quality—to align agent behavior with specific project budgets and performance needs. This ensures that every request is sent to the cheapest possible model that can still handle the workload effectively.

Smart Model Router Use Cases

  • Automatically routing simple status checks and greetings to free or near-zero cost models.
  • Escalating multi-file code refactoring and architecture design to premium models like Claude Sonnet or GPT-5.
  • Executing high-volume batch summarization tasks using cost-efficient Tier 1 models.
  • Performing deep reasoning tasks such as mathematical proofs or security audits with advanced Tier 4 models.
  • Managing agentic workflows where sub-tasks require varying levels of intelligence to save on monthly API spend.

How Smart Model Router Works

  1. The skill analyzes the input task for complexity indicators such as keywords, formatting requirements, and technical depth.
  2. It classifies the task into one of five tiers: Simple, Moderate, Complex, or Reasoning.
  3. Based on the active optimization mode (Balanced, Aggressive, or Quality), it selects the optimal model ID.
  4. The task is executed via the sessions_spawn command using the selected model.
  5. If the model produces low-quality output or fails, the system follows a progressive escalation pattern to a more capable tier.

Smart Model Router Setup

To implement the model router within your agent environment, ensure your OpenRouter or provider API keys are configured for the relevant tiers. You can then trigger the routing logic within your workflows:

sessions_spawn --task "Your task here" --model [selected-model-id]

Users can switch modes mid-conversation by providing specific instructions such as "use aggressive routing" or "use quality mode" to update the underlying selection logic for all subsequent Openclaw Skills operations.

Smart Model Router Data Schema & Taxonomy

The skill uses a tiered taxonomy to organize model selection and pricing metadata. This structure allows the router to evaluate the best cost-to-performance ratio dynamically.

Tier Classification Core Capability
Tier 0 Free Basic talk, status checks, and high-volume simple tasks.
Tier 1 Simple Fast, multimodal, and near-zero cost for translations or lookups.
Tier 2 Moderate Summarization, single-file code edits, and research synthesis.
Tier 3 Complex Multi-file refactoring, system design, and creative writing.
Tier 4 Reasoning Formal logic, security analysis, and deep STEM reasoning.

Smart Model Router Advanced Features

  • Progressive Escalation: Automatically retries failed or low-quality tasks on higher-tier models up to three times.
  • Optimization Modes: Toggle between Maximum Savings (Aggressive) and Maximum Quality modes to control budget usage.
  • Parallel Batch Processing: Distributes large batches of simple tasks to Tier 1 models for massive cost reduction.
  • Multi-Provider Routing: Support for OpenAI, Anthropic, Google, and DeepSeek, including real-time pricing references for February 2026.
  • Context Window Management: Automatically selects models like Gemini 2.5 Pro for tasks requiring up to 2M context tokens.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*