iblai-router

Cost-optimizing model router for OpenClaw. Automatically routes each request to the cheapest capable Claude model (Haiku/Sonnet/Opus) using weighted scoring. Use when setting up smart model routing, reducing API costs, or configuring multi-tier LLM routing. Supports Anthropic models directly and OpenAI/Google models via OpenRouter.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "iblai-router" with this command: npx skills add iblai/iblai-openclaw-router/iblai-iblai-openclaw-router-iblai-router

iblai-router

A zero-dependency proxy that sits between OpenClaw and the Anthropic API, routing each request to the cheapest capable model using a 14-dimension weighted scorer (<1ms overhead).

Install

Run the install script to set up everything automatically:

bash "$(dirname "$0")/scripts/install.sh"

This will:

  1. Copy server.js and config.json to ~/.openclaw/workspace/router/
  2. Create and start a systemd service (iblai-router) on port 8402
  3. Register iblai-router/auto as an OpenClaw model provider

After install, iblai-router/auto is available anywhere OpenClaw accepts a model ID.

Verify

curl -s http://127.0.0.1:8402/health | jq .
curl -s http://127.0.0.1:8402/stats | jq .

Use

Set iblai-router/auto as the model for any scope:

ScopeHow
Cron jobSet model to iblai-router/auto in job config
Subagentsagents.defaults.subagents.model = "iblai-router/auto"
Per-session/model iblai-router/auto
All sessionsagents.defaults.model.primary = "iblai-router/auto"

Tip: Keep the main interactive session on a fixed model (e.g. Opus). Use the router for cron jobs, subagents, and background tasks where cost savings compound.

Customize

All config lives in ~/.openclaw/workspace/router/config.json and hot-reloads on save — no restart needed.

Models

Change the models per tier:

{
  "models": {
    "LIGHT":  "claude-3-5-haiku-20241022",
    "MEDIUM": "claude-sonnet-4-20250514",
    "HEAVY":  "claude-opus-4-20250514"
  }
}

Non-Anthropic models (OpenAI, Google)

Set apiBaseUrl to route through OpenRouter:

{
  "models": {
    "LIGHT":  "openai/gpt-4.1-mini",
    "MEDIUM": "openai/gpt-4.1",
    "HEAVY":  "openai/o3"
  },
  "apiBaseUrl": "https://openrouter.ai/api/v1"
}

Update the API key in the systemd service when switching providers, then systemctl daemon-reload && systemctl restart iblai-router.

Scoring

Keyword lists control which tier handles a request:

  • simpleKeywords, relayKeywords → push toward LIGHT (cheap)
  • imperativeVerbs, codeKeywords, agenticKeywords → push toward MEDIUM
  • technicalKeywords, reasoningKeywords, domainKeywords → push toward HEAVY (capable)

Tune boundaries and weights in config.json to match your workload. See the full README for details.

Uninstall

bash "$(dirname "$0")/scripts/uninstall.sh"

Stops the service, removes the systemd unit, and deletes router files. Reminder: switch any workloads using iblai-router/auto back to a direct model first.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

ll-feishu-audio

飞书语音交互技能。支持语音消息自动识别、AI 处理、语音回复全流程。需要配置 FEISHU_APP_ID 和 FEISHU_APP_SECRET 环境变量。使用 faster-whisper 进行语音识别,Edge TTS 进行语音合成,自动转换 OPUS 格式并通过飞书发送。适用于飞书平台的语音对话场景。

Archived SourceRecently Updated
General

test_skill

import json import tkinter as tk from tkinter import messagebox, simpledialog

Archived SourceRecently Updated
General

51mee-resume-profile

简历画像。触发场景:用户要求生成候选人画像;用户想了解候选人的多维度标签和能力评估。

Archived SourceRecently Updated
General

51mee-resume-parse

简历解析。触发场景:用户上传简历文件要求解析、提取结构化信息。

Archived SourceRecently Updated