model-route-guard
Diagnose and fix model routing conflicts. Ensure primary model uses correct provider endpoint without duplicate overrides.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/dalomeve/model-route-guardModel Route Guard
Fix model routing and provider endpoint conflicts.
Problem
Model routing issues cause:
- Wrong provider endpoint used
- Duplicate provider definitions
- Agent overrides conflicting with global config
- Silent fallback to wrong model
Workflow
1. Route Audit
# Check global config
$cfg = Get-Content "$HOME/.openclaw/openclaw.json" -Raw | ConvertFrom-Json
$globalBase = $cfg.models.providers.bailian.baseUrl
$globalModel = $cfg.agents.defaults.model.primary
# Check agent overrides
$agentCfgPath = "$HOME/.openclaw/agents/main/agent/models.json"
if (Test-Path $agentCfgPath) {
$agentCfg = Get-Content $agentCfgPath -Raw | ConvertFrom-Json
$agentBase = $agentCfg.providers.bailian.baseUrl
}
"Global baseUrl = $globalBase"
"Global model = $globalModel"
"Agent baseUrl = $agentBase"
# Detect conflicts
if ($globalBase -ne $agentBase) {
Write-Warning "Provider URL mismatch between global and agent config"
}
2. Fix Conflicts
# Correct endpoint (coding.dashscope, not coding-intl)
$correctUrl = "https://coding.dashscope.aliyuncs.com/v1"
# Update global config
$cfg.models.providers.bailian.baseUrl = $correctUrl
$cfg | ConvertTo-Json -Depth 10 | Out-File "$HOME/.openclaw/openclaw.json" -Encoding UTF8
# Remove conflicting agent override
if (Test-Path $agentCfgPath) {
Remove-Item $agentCfgPath -Force
}
# Restart
openclaw gateway restart
3. Verification
# Test model call
openclaw models list
# Check active route
openclaw status
Executable Completion Criteria
| Criteria | Verification |
|---|---|
| Single provider URL | Only one bailian.baseUrl in config |
| Correct endpoint | URL is coding.dashscope.aliyuncs.com |
| No duplicate overrides | models.json removed or aligned |
| Model call succeeds | openclaw models list works |
Privacy/Safety
- No API keys in audit output
- Redact key values (show first 4 chars)
- Config files only, no external logging
Self-Use Trigger
Use when:
- Model calls fail with endpoint errors
- Config shows multiple provider definitions
- After gateway restart with model issues
- Silent fallback to wrong model detected
One route. One source of truth.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-dalomeve-model-route-guard": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
Instruction Anchor Guard
Skill by dalomeve
ui-design-optimizer
Generate practical UI design systems and starter pages using local style/color/typography datasets. Use for landing page or dashboard UI planning and implementation.
Skill Governance Balanced
Skill by dalomeve
clawhub-web-publisher
Publish OpenClaw skills to ClawHub using the web dashboard only (no CLI login). Use when an agent must reliably upload a local skill folder, avoid auth-loop failures, and enforce privacy-safe publishing with verification evidence.
evidence-url-verifier
Verify evidence URLs are real and accessible. Check that artifact links resolve to actual content, not placeholders.