Infinity Router for Openclaw

Infinity Router is a specialized tool for Openclaw Skills that automates the discovery, scoring, and rotation of free AI models from OpenRouter to eliminate downtime and reduce costs.

genoshide
v2.1.0
Apr 12, 2026
0
648
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install infinity-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 infinity-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 Infinity Router?

Infinity Router is a technical utility designed to optimize the performance and cost-efficiency of AI agents. By integrating with the OpenRouter API, it provides Openclaw Skills users with the ability to leverage a wide array of free models without the manual overhead of constant configuration updates. It intelligently filters for chat-specific, tool-capable models while excluding those that fail at runtime, ensuring your agent remains functional and responsive.

The tool serves as a bridge between the agent's gateway and the OpenRouter ecosystem, providing a smart fallback logic that triggers when rate limits are reached. This ensures that Openclaw Skills can operate continuously by automatically switching to the next best available model in a pre-configured, ranked chain.

Infinity Router Use Cases

  • Automating the selection of high-performing free models to reduce API spend.
  • Implementing zero-interruption fallback chains for Openclaw Skills agents.
  • Rotating multiple API keys to bypass daily free-tier usage limits.
  • Validating model tool-capabilities before deployment to prevent agent hallucination.
  • Monitoring gateway logs in real-time to auto-restart services upon model failure.

How Infinity Router Works

  1. The utility scans the OpenRouter API to fetch a real-time list of all available free models.
  2. It filters the results to ensure only chat-capable models are considered, removing embedding or image-only models.
  3. A scoring algorithm ranks models based on their tool-use capabilities and current availability.
  4. It generates a primary model and a secondary fallback chain (defaulting to 5 alternatives) and writes them to the Openclaw Skills configuration.
  5. Upon deployment, the system can monitor for 429 rate limit errors or model errors to trigger an automatic rotation of keys or models.

Infinity Router Setup

To begin using Infinity Router with Openclaw Skills, follow these steps:

# 1. Set your OpenRouter API key(s)
openclaw config set env.OPENROUTER_API_KEY "sk-or-v1-your-key"

# 2. Install the utility
cd /path/to/infinity-router
chmod +x install.sh
./install.sh

# 3. Configure the best model and restart the gateway
infinity-router pick --validate
openclaw gateway restart

Infinity Router Data Schema & Taxonomy

Infinity Router maintains its state and configuration through specific file structures and JSON keys within the Openclaw Skills environment:

Key/Path Purpose
~/.infinity-router/model-cache.json Stores the local cache of OpenRouter model metadata and scores.
agents.defaults.model.primary Defines the top-ranked free model currently in use.
agents.defaults.model.fallbacks An ordered list of backup models (e.g., ["openrouter/free", ...]).
agents.defaults.models An allowlist of validated models allowed for selection.

Infinity Router Advanced Features

  • Multi-Key Rotation: Supports comma-separated API keys to scale beyond single-account rate limits.
  • Validation Mode: Uses the --validate flag to probe models in real-time, preventing configuration of stale or broken models.
  • Background Daemon: Includes infinity-router-daemon for autonomous, loop-based monitoring and failure recovery.
  • Custom Targets: Ability to target both OpenClaw and Claude Code configuration schemas.
  • Webhook Integration: Send POST notifications to custom URLs whenever a model rotation or failure occurs.
  • Performance Benchmarking: Built-in latency testing to identify the fastest responding free models in your current region.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*