{
  "schemaVersion": "1.0",
  "item": {
    "slug": "intelligent-router",
    "name": "Intelligent Router",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/bowen31337/intelligent-router",
    "canonicalUrl": "https://clawhub.ai/bowen31337/intelligent-router",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/intelligent-router",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=intelligent-router",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "README.md",
      "SKILL.md",
      "install.sh",
      "scripts/auto_refresh_models.sh",
      "scripts/discover_models.py",
      "scripts/fix_tiers.py"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/intelligent-router"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/intelligent-router",
    "agentPageUrl": "https://openagent3.xyz/skills/intelligent-router/agent",
    "manifestUrl": "https://openagent3.xyz/skills/intelligent-router/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/intelligent-router/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Intelligent Router — Core Skill",
        "body": "CORE SKILL: This skill is infrastructure, not guidance. Installation = enforcement.\nRun bash skills/intelligent-router/install.sh to activate."
      },
      {
        "title": "What It Does",
        "body": "Automatically classifies any task into a tier (SIMPLE/MEDIUM/COMPLEX/REASONING/CRITICAL)\nand recommends the cheapest model that can handle it well.\n\nThe problem it solves: Without routing, every cron job and sub-agent defaults to Sonnet\n(expensive). With routing, monitoring tasks use free local models, saving 80-95% on cost."
      },
      {
        "title": "Before spawning any sub-agent:",
        "body": "python3 skills/intelligent-router/scripts/router.py classify \"task description\""
      },
      {
        "title": "Before creating any cron job:",
        "body": "python3 skills/intelligent-router/scripts/spawn_helper.py \"task description\"\n# Outputs the exact model ID and payload snippet to use"
      },
      {
        "title": "To validate a cron payload has model set:",
        "body": "python3 skills/intelligent-router/scripts/spawn_helper.py --validate '{\"kind\":\"agentTurn\",\"message\":\"...\"}'"
      },
      {
        "title": "❌ VIOLATION (never do this):",
        "body": "# Cron job without model = Sonnet default = expensive waste\n{\"kind\": \"agentTurn\", \"message\": \"check server...\"}  # ← WRONG"
      },
      {
        "title": "✅ CORRECT:",
        "body": "# Always specify model from router recommendation\n{\"kind\": \"agentTurn\", \"message\": \"check server...\", \"model\": \"ollama/glm-4.7-flash\"}"
      },
      {
        "title": "Tier System",
        "body": "TierUse ForPrimary ModelCost🟢 SIMPLEMonitoring, heartbeat, checks, summariesanthropic-proxy-6/glm-4.7 (alt: proxy-4)$0.50/M🟡 MEDIUMCode fixes, patches, research, data analysisnvidia-nim/meta/llama-3.3-70b-instruct$0.40/M🟠 COMPLEXFeatures, architecture, multi-file, debuganthropic/claude-sonnet-4-6$3/M🔵 REASONINGProofs, formal logic, deep analysisnvidia-nim/moonshotai/kimi-k2-thinking$1/M🔴 CRITICALSecurity, production, high-stakesanthropic/claude-opus-4-6$5/M\n\nSIMPLE fallback chain: anthropic-proxy-4/glm-4.7 → nvidia-nim/qwen/qwen2.5-7b-instruct ($0.15/M)\n\n⚠️ ollama-gpu-server is BLOCKED for cron/spawn use. Ollama binds to 127.0.0.1 by default — unreachable over LAN from the OpenClaw host. The router_policy.py enforcer will reject any payload referencing it.\n\nTier classification uses 4 capability signals (not cost alone):\n\neffective_params (50%) — extracted from model ID or known-model-params.json for closed-source models\ncontext_window (20%) — larger = more capable\ncost_input (20%) — price as quality proxy (weak signal, last resort for unknown sizes)\nreasoning_flag (10%) — bonus for dedicated thinking specialists (R1, QwQ, Kimi-K2)"
      },
      {
        "title": "Policy Enforcer (NEW in v3.2.0)",
        "body": "router_policy.py catches bad model assignments before they are created, not after they fail."
      },
      {
        "title": "Validate a cron payload before submitting",
        "body": "python3 skills/intelligent-router/scripts/router_policy.py check \\\n  '{\"kind\":\"agentTurn\",\"model\":\"ollama-gpu-server/glm-4.7-flash\",\"message\":\"check server\"}'\n# Output: VIOLATION: Blocked model 'ollama-gpu-server/glm-4.7-flash'. Recommended: anthropic-proxy-6/glm-4.7"
      },
      {
        "title": "Get enforced model recommendation for a task",
        "body": "python3 skills/intelligent-router/scripts/router_policy.py recommend \"monitor alphastrike service\"\n# Output: Tier: SIMPLE  Model: anthropic-proxy-6/glm-4.7\n\npython3 skills/intelligent-router/scripts/router_policy.py recommend \"monitor alphastrike service\" --alt\n# Output: Tier: SIMPLE  Model: anthropic-proxy-4/glm-4.7  ← alternate key for load distribution"
      },
      {
        "title": "Audit all existing cron jobs",
        "body": "python3 skills/intelligent-router/scripts/router_policy.py audit\n# Scans all crons, reports any with blocked or missing models"
      },
      {
        "title": "Show blocklist",
        "body": "python3 skills/intelligent-router/scripts/router_policy.py blocklist"
      },
      {
        "title": "Policy rules enforced",
        "body": "Model must be set — no model field = Sonnet default = expensive waste\nNo blocked models — ollama-gpu-server/* and bare ollama/* are rejected for cron use\nCRITICAL tasks — warns if using a non-Opus model for classified-critical work"
      },
      {
        "title": "Installation (Core Skill Setup)",
        "body": "Run once to self-integrate into AGENTS.md:\n\nbash skills/intelligent-router/install.sh\n\nThis patches AGENTS.md with the mandatory protocol so it's always in context."
      },
      {
        "title": "CLI Reference",
        "body": "# ── Policy enforcer (run before creating any cron/spawn) ──\npython3 skills/intelligent-router/scripts/router_policy.py check '{\"kind\":\"agentTurn\",\"model\":\"...\",\"message\":\"...\"}'\npython3 skills/intelligent-router/scripts/router_policy.py recommend \"task description\"\npython3 skills/intelligent-router/scripts/router_policy.py recommend \"task\" --alt  # alternate proxy key\npython3 skills/intelligent-router/scripts/router_policy.py audit     # scan all crons\npython3 skills/intelligent-router/scripts/router_policy.py blocklist\n\n# ── Core router ──\n# Classify + recommend model\npython3 skills/intelligent-router/scripts/router.py classify \"task\"\n\n# Get model id only (for scripting)\npython3 skills/intelligent-router/scripts/spawn_helper.py --model-only \"task\"\n\n# Show spawn command\npython3 skills/intelligent-router/scripts/spawn_helper.py \"task\"\n\n# Validate cron payload has model set\npython3 skills/intelligent-router/scripts/spawn_helper.py --validate '{\"kind\":\"agentTurn\",\"message\":\"...\"}'\n\n# List all models by tier\npython3 skills/intelligent-router/scripts/router.py models\n\n# Detailed scoring breakdown\npython3 skills/intelligent-router/scripts/router.py score \"task\"\n\n# Config health check\npython3 skills/intelligent-router/scripts/router.py health\n\n# Auto-discover working models (NEW)\npython3 skills/intelligent-router/scripts/discover_models.py\n\n# Auto-discover + update config\npython3 skills/intelligent-router/scripts/discover_models.py --auto-update\n\n# Test specific tier only\npython3 skills/intelligent-router/scripts/discover_models.py --tier COMPLEX"
      },
      {
        "title": "Scoring System",
        "body": "15-dimension weighted scoring (not just keywords):\n\nReasoning markers (0.18) — prove, theorem, derive\nCode presence (0.15) — code blocks, file extensions\nMulti-step patterns (0.12) — first...then, numbered lists\nAgentic task (0.10) — run, fix, deploy, build\nTechnical terms (0.10) — architecture, security, protocol\nToken count (0.08) — complexity from length\nCreative markers (0.05) — story, compose, brainstorm\nQuestion complexity (0.05) — multiple who/what/how\nConstraint count (0.04) — must, require, exactly\nImperative verbs (0.03) — analyze, evaluate, audit\nOutput format (0.03) — json, table, markdown\nSimple indicators (0.02) — check, get, show (inverted)\nDomain specificity (0.02) — acronyms, dotted notation\nReference complexity (0.02) — \"mentioned above\"\nNegation complexity (0.01) — not, never, except\n\nConfidence: 1 / (1 + exp(-8 × (score - 0.5)))"
      },
      {
        "title": "Config",
        "body": "Models defined in config.json. Add new models there, router picks them up automatically.\nLocal Ollama models have zero cost — always prefer them for SIMPLE tasks."
      },
      {
        "title": "Auto-Discovery (Self-Healing)",
        "body": "The intelligent-router can automatically discover working models from all configured providers via real live inference tests (not config-existence checks)."
      },
      {
        "title": "How It Works",
        "body": "Provider Scanning: Reads ~/.openclaw/openclaw.json → finds all models\nLive Inference Test: Sends \"hi\" to each model, checks it actually responds (catches auth failures, quota exhaustion, 404s, timeouts)\nOAuth Bypass: Providers with sk-ant-oat01-* tokens (Anthropic OAuth) are skipped in raw HTTP — OpenClaw refreshes these transparently, so they're always marked available\nThinking Model Support: Models that return content=None + reasoning_content (GLM-4.7, Kimi-K2, Qwen3-thinking) are correctly detected as available\nAuto-Classification: Tiers assigned via tier_classifier.py using 4 capability signals\nConfig Update: Removes unavailable models, rebuilds tier primaries from working set\nCron: Hourly refresh (cron id: a8992c1f) keeps model list current, alerts if availability changes by >2"
      },
      {
        "title": "Usage",
        "body": "# One-time discovery\npython3 skills/intelligent-router/scripts/discover_models.py\n\n# Auto-update config with working models only\npython3 skills/intelligent-router/scripts/discover_models.py --auto-update\n\n# Set up hourly refresh cron\nopenclaw cron add --job '{\n  \"name\": \"Model Discovery Refresh\",\n  \"schedule\": {\"kind\": \"every\", \"everyMs\": 3600000},\n  \"payload\": {\n    \"kind\": \"systemEvent\",\n    \"text\": \"Run: bash skills/intelligent-router/scripts/auto_refresh_models.sh\",\n    \"model\": \"ollama/glm-4.7-flash\"\n  }\n}'"
      },
      {
        "title": "Benefits",
        "body": "✅ Self-healing: Automatically removes broken models (e.g., expired OAuth)\n✅ Zero maintenance: No manual model list updates\n✅ New models: Auto-adds newly released models\n✅ Cost optimization: Always uses cheapest working model per tier"
      },
      {
        "title": "Discovery Output",
        "body": "Results saved to skills/intelligent-router/discovered-models.json:\n\n{\n  \"scan_timestamp\": \"2026-02-19T21:00:00\",\n  \"total_models\": 25,\n  \"available_models\": 23,\n  \"unavailable_models\": 2,\n  \"providers\": {\n    \"anthropic\": {\n      \"available\": 2,\n      \"unavailable\": 0,\n      \"models\": [...]\n    }\n  }\n}"
      },
      {
        "title": "Pinning Models",
        "body": "To preserve a model even if it fails discovery:\n\n{\n  \"id\": \"special-model\",\n  \"tier\": \"COMPLEX\",\n  \"pinned\": true  // Never remove during auto-update\n}"
      },
      {
        "title": "⚠️ Known Gap — Proactive Health-Based Routing (2026-03-04)",
        "body": "Current router is reactive not proactive:\n\nFallback only fires AFTER a 429 is received\nNo awareness of concurrent sessions on same proxy\nNo cooldown tracking after rate-limit events\n\nNeeded improvements:\n\nTrack last-429 timestamp per provider → skip if within cooldown window\nTrack active concurrent spawns per provider → if >1 active, route to OAuth\nBefore spawning N parallel agents, check if single provider can handle N concurrent\nExpose router.get_best_available(n_concurrent=2) API"
      }
    ],
    "body": "Intelligent Router — Core Skill\n\nCORE SKILL: This skill is infrastructure, not guidance. Installation = enforcement. Run bash skills/intelligent-router/install.sh to activate.\n\nWhat It Does\n\nAutomatically classifies any task into a tier (SIMPLE/MEDIUM/COMPLEX/REASONING/CRITICAL) and recommends the cheapest model that can handle it well.\n\nThe problem it solves: Without routing, every cron job and sub-agent defaults to Sonnet (expensive). With routing, monitoring tasks use free local models, saving 80-95% on cost.\n\nMANDATORY Protocol (enforced via AGENTS.md)\nBefore spawning any sub-agent:\npython3 skills/intelligent-router/scripts/router.py classify \"task description\"\n\nBefore creating any cron job:\npython3 skills/intelligent-router/scripts/spawn_helper.py \"task description\"\n# Outputs the exact model ID and payload snippet to use\n\nTo validate a cron payload has model set:\npython3 skills/intelligent-router/scripts/spawn_helper.py --validate '{\"kind\":\"agentTurn\",\"message\":\"...\"}'\n\n❌ VIOLATION (never do this):\n# Cron job without model = Sonnet default = expensive waste\n{\"kind\": \"agentTurn\", \"message\": \"check server...\"}  # ← WRONG\n\n✅ CORRECT:\n# Always specify model from router recommendation\n{\"kind\": \"agentTurn\", \"message\": \"check server...\", \"model\": \"ollama/glm-4.7-flash\"}\n\nTier System\nTier\tUse For\tPrimary Model\tCost\n🟢 SIMPLE\tMonitoring, heartbeat, checks, summaries\tanthropic-proxy-6/glm-4.7 (alt: proxy-4)\t$0.50/M\n🟡 MEDIUM\tCode fixes, patches, research, data analysis\tnvidia-nim/meta/llama-3.3-70b-instruct\t$0.40/M\n🟠 COMPLEX\tFeatures, architecture, multi-file, debug\tanthropic/claude-sonnet-4-6\t$3/M\n🔵 REASONING\tProofs, formal logic, deep analysis\tnvidia-nim/moonshotai/kimi-k2-thinking\t$1/M\n🔴 CRITICAL\tSecurity, production, high-stakes\tanthropic/claude-opus-4-6\t$5/M\n\nSIMPLE fallback chain: anthropic-proxy-4/glm-4.7 → nvidia-nim/qwen/qwen2.5-7b-instruct ($0.15/M)\n\n⚠️ ollama-gpu-server is BLOCKED for cron/spawn use. Ollama binds to 127.0.0.1 by default — unreachable over LAN from the OpenClaw host. The router_policy.py enforcer will reject any payload referencing it.\n\nTier classification uses 4 capability signals (not cost alone):\n\neffective_params (50%) — extracted from model ID or known-model-params.json for closed-source models\ncontext_window (20%) — larger = more capable\ncost_input (20%) — price as quality proxy (weak signal, last resort for unknown sizes)\nreasoning_flag (10%) — bonus for dedicated thinking specialists (R1, QwQ, Kimi-K2)\nPolicy Enforcer (NEW in v3.2.0)\n\nrouter_policy.py catches bad model assignments before they are created, not after they fail.\n\nValidate a cron payload before submitting\npython3 skills/intelligent-router/scripts/router_policy.py check \\\n  '{\"kind\":\"agentTurn\",\"model\":\"ollama-gpu-server/glm-4.7-flash\",\"message\":\"check server\"}'\n# Output: VIOLATION: Blocked model 'ollama-gpu-server/glm-4.7-flash'. Recommended: anthropic-proxy-6/glm-4.7\n\nGet enforced model recommendation for a task\npython3 skills/intelligent-router/scripts/router_policy.py recommend \"monitor alphastrike service\"\n# Output: Tier: SIMPLE  Model: anthropic-proxy-6/glm-4.7\n\npython3 skills/intelligent-router/scripts/router_policy.py recommend \"monitor alphastrike service\" --alt\n# Output: Tier: SIMPLE  Model: anthropic-proxy-4/glm-4.7  ← alternate key for load distribution\n\nAudit all existing cron jobs\npython3 skills/intelligent-router/scripts/router_policy.py audit\n# Scans all crons, reports any with blocked or missing models\n\nShow blocklist\npython3 skills/intelligent-router/scripts/router_policy.py blocklist\n\nPolicy rules enforced\nModel must be set — no model field = Sonnet default = expensive waste\nNo blocked models — ollama-gpu-server/* and bare ollama/* are rejected for cron use\nCRITICAL tasks — warns if using a non-Opus model for classified-critical work\nInstallation (Core Skill Setup)\n\nRun once to self-integrate into AGENTS.md:\n\nbash skills/intelligent-router/install.sh\n\n\nThis patches AGENTS.md with the mandatory protocol so it's always in context.\n\nCLI Reference\n# ── Policy enforcer (run before creating any cron/spawn) ──\npython3 skills/intelligent-router/scripts/router_policy.py check '{\"kind\":\"agentTurn\",\"model\":\"...\",\"message\":\"...\"}'\npython3 skills/intelligent-router/scripts/router_policy.py recommend \"task description\"\npython3 skills/intelligent-router/scripts/router_policy.py recommend \"task\" --alt  # alternate proxy key\npython3 skills/intelligent-router/scripts/router_policy.py audit     # scan all crons\npython3 skills/intelligent-router/scripts/router_policy.py blocklist\n\n# ── Core router ──\n# Classify + recommend model\npython3 skills/intelligent-router/scripts/router.py classify \"task\"\n\n# Get model id only (for scripting)\npython3 skills/intelligent-router/scripts/spawn_helper.py --model-only \"task\"\n\n# Show spawn command\npython3 skills/intelligent-router/scripts/spawn_helper.py \"task\"\n\n# Validate cron payload has model set\npython3 skills/intelligent-router/scripts/spawn_helper.py --validate '{\"kind\":\"agentTurn\",\"message\":\"...\"}'\n\n# List all models by tier\npython3 skills/intelligent-router/scripts/router.py models\n\n# Detailed scoring breakdown\npython3 skills/intelligent-router/scripts/router.py score \"task\"\n\n# Config health check\npython3 skills/intelligent-router/scripts/router.py health\n\n# Auto-discover working models (NEW)\npython3 skills/intelligent-router/scripts/discover_models.py\n\n# Auto-discover + update config\npython3 skills/intelligent-router/scripts/discover_models.py --auto-update\n\n# Test specific tier only\npython3 skills/intelligent-router/scripts/discover_models.py --tier COMPLEX\n\nScoring System\n\n15-dimension weighted scoring (not just keywords):\n\nReasoning markers (0.18) — prove, theorem, derive\nCode presence (0.15) — code blocks, file extensions\nMulti-step patterns (0.12) — first...then, numbered lists\nAgentic task (0.10) — run, fix, deploy, build\nTechnical terms (0.10) — architecture, security, protocol\nToken count (0.08) — complexity from length\nCreative markers (0.05) — story, compose, brainstorm\nQuestion complexity (0.05) — multiple who/what/how\nConstraint count (0.04) — must, require, exactly\nImperative verbs (0.03) — analyze, evaluate, audit\nOutput format (0.03) — json, table, markdown\nSimple indicators (0.02) — check, get, show (inverted)\nDomain specificity (0.02) — acronyms, dotted notation\nReference complexity (0.02) — \"mentioned above\"\nNegation complexity (0.01) — not, never, except\n\nConfidence: 1 / (1 + exp(-8 × (score - 0.5)))\n\nConfig\n\nModels defined in config.json. Add new models there, router picks them up automatically. Local Ollama models have zero cost — always prefer them for SIMPLE tasks.\n\nAuto-Discovery (Self-Healing)\n\nThe intelligent-router can automatically discover working models from all configured providers via real live inference tests (not config-existence checks).\n\nHow It Works\nProvider Scanning: Reads ~/.openclaw/openclaw.json → finds all models\nLive Inference Test: Sends \"hi\" to each model, checks it actually responds (catches auth failures, quota exhaustion, 404s, timeouts)\nOAuth Bypass: Providers with sk-ant-oat01-* tokens (Anthropic OAuth) are skipped in raw HTTP — OpenClaw refreshes these transparently, so they're always marked available\nThinking Model Support: Models that return content=None + reasoning_content (GLM-4.7, Kimi-K2, Qwen3-thinking) are correctly detected as available\nAuto-Classification: Tiers assigned via tier_classifier.py using 4 capability signals\nConfig Update: Removes unavailable models, rebuilds tier primaries from working set\nCron: Hourly refresh (cron id: a8992c1f) keeps model list current, alerts if availability changes by >2\nUsage\n# One-time discovery\npython3 skills/intelligent-router/scripts/discover_models.py\n\n# Auto-update config with working models only\npython3 skills/intelligent-router/scripts/discover_models.py --auto-update\n\n# Set up hourly refresh cron\nopenclaw cron add --job '{\n  \"name\": \"Model Discovery Refresh\",\n  \"schedule\": {\"kind\": \"every\", \"everyMs\": 3600000},\n  \"payload\": {\n    \"kind\": \"systemEvent\",\n    \"text\": \"Run: bash skills/intelligent-router/scripts/auto_refresh_models.sh\",\n    \"model\": \"ollama/glm-4.7-flash\"\n  }\n}'\n\nBenefits\n\n✅ Self-healing: Automatically removes broken models (e.g., expired OAuth) ✅ Zero maintenance: No manual model list updates ✅ New models: Auto-adds newly released models ✅ Cost optimization: Always uses cheapest working model per tier\n\nDiscovery Output\n\nResults saved to skills/intelligent-router/discovered-models.json:\n\n{\n  \"scan_timestamp\": \"2026-02-19T21:00:00\",\n  \"total_models\": 25,\n  \"available_models\": 23,\n  \"unavailable_models\": 2,\n  \"providers\": {\n    \"anthropic\": {\n      \"available\": 2,\n      \"unavailable\": 0,\n      \"models\": [...]\n    }\n  }\n}\n\nPinning Models\n\nTo preserve a model even if it fails discovery:\n\n{\n  \"id\": \"special-model\",\n  \"tier\": \"COMPLEX\",\n  \"pinned\": true  // Never remove during auto-update\n}\n\n⚠️ Known Gap — Proactive Health-Based Routing (2026-03-04)\n\nCurrent router is reactive not proactive:\n\nFallback only fires AFTER a 429 is received\nNo awareness of concurrent sessions on same proxy\nNo cooldown tracking after rate-limit events\n\nNeeded improvements:\n\nTrack last-429 timestamp per provider → skip if within cooldown window\nTrack active concurrent spawns per provider → if >1 active, route to OAuth\nBefore spawning N parallel agents, check if single provider can handle N concurrent\nExpose router.get_best_available(n_concurrent=2) API"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/bowen31337/intelligent-router",
    "publisherUrl": "https://clawhub.ai/bowen31337/intelligent-router",
    "owner": "bowen31337",
    "version": "3.0.1",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/intelligent-router",
    "downloadUrl": "https://openagent3.xyz/downloads/intelligent-router",
    "agentUrl": "https://openagent3.xyz/skills/intelligent-router/agent",
    "manifestUrl": "https://openagent3.xyz/skills/intelligent-router/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/intelligent-router/agent.md"
  }
}