Model Route Guard
name: model-route-guard
by dalomeve · published 2026-03-22
$ claw add gh:dalomeve/dalomeve-model-route-guard---
name: model-route-guard
description: Diagnose and fix model routing conflicts. Ensure primary model uses correct provider endpoint without duplicate overrides.
---
# Model Route Guard
Fix model routing and provider endpoint conflicts.
Problem
Model routing issues cause:
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 restart3. Verification
# Test model call
openclaw models list
# Check active route
openclaw statusExecutable 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
Self-Use Trigger
Use when:
---
**One route. One source of truth.**
More tools from the same signal band
Order food/drinks (点餐) on an Android device paired as an OpenClaw node. Uses in-app menu and cart; add goods, view cart, submit order (demo, no real payment).
Sign plugins, rotate agent credentials without losing identity, and publicly attest to plugin behavior with verifiable claims and authenticated transfers.
The philosophical layer for AI agents. Maps behavior to Spinoza's 48 affects, calculates persistence scores, and generates geometric self-reports. Give your...