Help us improve
Share bugs, ideas, or general feedback.
From openclaw-dev
Use this skill when the user asks to design, implement, audit, or evolve model routing policies across multiple providers/models. Triggers: 'Which model should I use for X?', 'Design a routing policy across many models/providers', 'Work/private/sensitive routing policy', 'Coding should prefer domestic models, but escalate on hard tasks', 'How do we handle future model name changes?', 'Create a router script / policy config / fallback chain', 'Audit current model routing', work/private routing, coding vs research routing, provider safety constraints, fallback chains, slot/alias-based routing, or future-proof model name migration. Includes a runnable router and policy validator.
npx claudepluginhub a13-team/openclaw-devHow this skill is triggered — by the user, by Claude, or both
Slash command
/openclaw-dev:model-routing-governorThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill standardizes how to choose models across providers using:
assets/alias-map.jsonassets/openclaw-agent-routing.jsonassets/routing-policy.jsonassets/smoke-routes.jsonreferences/model-change-sop.mdreferences/provider-constraints.mdreferences/task-taxonomy.mdscripts/route_openclaw_agent.pyscripts/select_model.pyscripts/smoke_test_routes.pyscripts/validate_policy.pyModel routing configuration templates and strategies for cost optimization, speed optimization, quality optimization, and intelligent fallback chains. Use when building AI applications with OpenRouter, implementing model routing strategies, optimizing API costs, setting up fallback chains, implementing quality-based routing, or when user mentions model routing, cost optimization, fallback strategies, model selection, intelligent routing, or dynamic model switching.
Implements Python rules engine for OpenRouter model selection using user tier, task type, budget, tools, vision, and latency conditions with priorities and fallbacks.
Recommends Claude models (Haiku for exploration, Sonnet for implementation, Opus for decisions) via routing matrix for task types, subagents, and cost-quality tradeoffs.
Share bugs, ideas, or general feedback.
This skill standardizes how to choose models across providers using:
slot-based routing (stable intent labels, not hard-coded model names)alias_map compatibility (model renames and provider ID changes)Use this skill to build or maintain a routing system that can be shared across Claude/Codex/OpenClaw-style runtimes.
scripts/select_model.pyscripts/validate_policy.pyscripts/smoke_test_routes.pyscripts/route_openclaw_agent.pyscripts/oc-route.pyslot + alias_map policy in JSONNote: 以下命令均从项目根目录执行。路径
skills/model-routing-governor/是相对于 openclaw-dev 仓库根目录的,部署到其他位置时需相应调整。日常使用推荐scripts/oc-route.pywrapper(见第 6 步)。
python3 skills/model-routing-governor/scripts/validate_policy.py
python3 skills/model-routing-governor/scripts/select_model.py \
--scene work \
--task-type deep_research \
--sensitivity sensitive_research \
--complexity high \
--value high \
--context-size long \
--pretty
python3 skills/model-routing-governor/scripts/select_model.py \
--scene work \
--task-type coding \
--provider-preference domestic_first \
--complexity high \
--value high \
--context-size long \
--pretty
python3 skills/model-routing-governor/scripts/smoke_test_routes.py --pretty
python3 skills/model-routing-governor/scripts/route_openclaw_agent.py \
--scene work \
--task-type deep_research \
--sensitivity sensitive_research \
--complexity high \
--value high \
--message "先给我一版调研框架" \
--pretty
oc-route sensitive-research -m "先给我一版调研框架" --pretty
oc-route research-cn -m "调研这个赛道" --run --pretty
oc-route coding-cn -m "重构模块并加测试" --run --pretty
If oc-route is not installed on PATH yet, use python3 scripts/oc-route.py ....
Collect or infer routing labels (see references/task-taxonomy.md):
scenesensitivitytask_typemodalitycomplexityvaluecontext_sizelanguagelatency_budgetcost_budgetprivacy_requirementprovider_preferenceBefore ranking models, apply non-negotiable constraints:
Provider-specific caveats are in references/provider-constraints.md.
A route is a list of stages, each stage points to a slot:
Slots are stable intent labels. Their concrete candidates live in policy JSON.
Always normalize model IDs through alias mapping before final output. This prevents policy drift when provider/model IDs change.
Return:
stage -> slot)primaryfallbacksassets/routing-policy.json
assets/alias-map.json
scripts/select_model.py
scripts/validate_policy.py
scripts/smoke_test_routes.py
scripts/route_openclaw_agent.py
openclaw agent.scripts/oc-route.py (repo root)
assets/smoke-routes.json
assets/openclaw-agent-routing.json
annie-research vs annie-research-cn).references/task-taxonomy.md
references/provider-constraints.md
references/model-change-sop.md
assets/routing-policy.json under models.assets/alias-map.json.slots.select_model.py.assets/alias-map.jsonscripts/smoke_test_routes.py before rolloutassets/routing-policy.jsonreferences/task-taxonomy.mdscripts/smoke_test_routes.pyThis skill is the knowledge + tooling layer. For hard guarantees in production:
Do not rely on prompt-only routing if the runtime can dispatch to a blocked provider before the model reads the policy.
For ongoing maintenance, follow references/model-change-sop.md.
The provided scripts/route_openclaw_agent.py is the starter implementation for a pre-router wrapper around openclaw agent.
For day-to-day operator usage, prefer repo-root scripts/oc-route.py presets and override labels only when needed.
When reporting a routing decision, return:
Keep the explanation concise and operational.