{
  "schemaVersion": "1.0",
  "item": {
    "slug": "model-route-guard",
    "name": "Model Route Guard",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/Dalomeve/model-route-guard",
    "canonicalUrl": "https://clawhub.ai/Dalomeve/model-route-guard",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/model-route-guard",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=model-route-guard",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "references/privacy-checklist.md",
      "SKILL.md"
    ],
    "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. 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. 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/model-route-guard"
    },
    "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/model-route-guard",
    "agentPageUrl": "https://openagent3.xyz/skills/model-route-guard/agent",
    "manifestUrl": "https://openagent3.xyz/skills/model-route-guard/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/model-route-guard/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. 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. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Model Route Guard",
        "body": "Fix model routing and provider endpoint conflicts."
      },
      {
        "title": "Problem",
        "body": "Model routing issues cause:\n\nWrong provider endpoint used\nDuplicate provider definitions\nAgent overrides conflicting with global config\nSilent fallback to wrong model"
      },
      {
        "title": "1. Route Audit",
        "body": "# Check global config\n$cfg = Get-Content \"$HOME/.openclaw/openclaw.json\" -Raw | ConvertFrom-Json\n$globalBase = $cfg.models.providers.bailian.baseUrl\n$globalModel = $cfg.agents.defaults.model.primary\n\n# Check agent overrides\n$agentCfgPath = \"$HOME/.openclaw/agents/main/agent/models.json\"\nif (Test-Path $agentCfgPath) {\n    $agentCfg = Get-Content $agentCfgPath -Raw | ConvertFrom-Json\n    $agentBase = $agentCfg.providers.bailian.baseUrl\n}\n\n\"Global baseUrl = $globalBase\"\n\"Global model   = $globalModel\"\n\"Agent baseUrl  = $agentBase\"\n\n# Detect conflicts\nif ($globalBase -ne $agentBase) {\n    Write-Warning \"Provider URL mismatch between global and agent config\"\n}"
      },
      {
        "title": "2. Fix Conflicts",
        "body": "# Correct endpoint (coding.dashscope, not coding-intl)\n$correctUrl = \"https://coding.dashscope.aliyuncs.com/v1\"\n\n# Update global config\n$cfg.models.providers.bailian.baseUrl = $correctUrl\n$cfg | ConvertTo-Json -Depth 10 | Out-File \"$HOME/.openclaw/openclaw.json\" -Encoding UTF8\n\n# Remove conflicting agent override\nif (Test-Path $agentCfgPath) {\n    Remove-Item $agentCfgPath -Force\n}\n\n# Restart\nopenclaw gateway restart"
      },
      {
        "title": "3. Verification",
        "body": "# Test model call\nopenclaw models list\n\n# Check active route\nopenclaw status"
      },
      {
        "title": "Executable Completion Criteria",
        "body": "CriteriaVerificationSingle provider URLOnly one bailian.baseUrl in configCorrect endpointURL is coding.dashscope.aliyuncs.comNo duplicate overridesmodels.json removed or alignedModel call succeedsopenclaw models list works"
      },
      {
        "title": "Privacy/Safety",
        "body": "No API keys in audit output\nRedact key values (show first 4 chars)\nConfig files only, no external logging"
      },
      {
        "title": "Self-Use Trigger",
        "body": "Use when:\n\nModel calls fail with endpoint errors\nConfig shows multiple provider definitions\nAfter gateway restart with model issues\nSilent fallback to wrong model detected\n\nOne route. One source of truth."
      }
    ],
    "body": "Model Route Guard\n\nFix model routing and provider endpoint conflicts.\n\nProblem\n\nModel routing issues cause:\n\nWrong provider endpoint used\nDuplicate provider definitions\nAgent overrides conflicting with global config\nSilent fallback to wrong model\nWorkflow\n1. Route Audit\n# Check global config\n$cfg = Get-Content \"$HOME/.openclaw/openclaw.json\" -Raw | ConvertFrom-Json\n$globalBase = $cfg.models.providers.bailian.baseUrl\n$globalModel = $cfg.agents.defaults.model.primary\n\n# Check agent overrides\n$agentCfgPath = \"$HOME/.openclaw/agents/main/agent/models.json\"\nif (Test-Path $agentCfgPath) {\n    $agentCfg = Get-Content $agentCfgPath -Raw | ConvertFrom-Json\n    $agentBase = $agentCfg.providers.bailian.baseUrl\n}\n\n\"Global baseUrl = $globalBase\"\n\"Global model   = $globalModel\"\n\"Agent baseUrl  = $agentBase\"\n\n# Detect conflicts\nif ($globalBase -ne $agentBase) {\n    Write-Warning \"Provider URL mismatch between global and agent config\"\n}\n\n2. Fix Conflicts\n# Correct endpoint (coding.dashscope, not coding-intl)\n$correctUrl = \"https://coding.dashscope.aliyuncs.com/v1\"\n\n# Update global config\n$cfg.models.providers.bailian.baseUrl = $correctUrl\n$cfg | ConvertTo-Json -Depth 10 | Out-File \"$HOME/.openclaw/openclaw.json\" -Encoding UTF8\n\n# Remove conflicting agent override\nif (Test-Path $agentCfgPath) {\n    Remove-Item $agentCfgPath -Force\n}\n\n# Restart\nopenclaw gateway restart\n\n3. Verification\n# Test model call\nopenclaw models list\n\n# Check active route\nopenclaw status\n\nExecutable Completion Criteria\nCriteria\tVerification\nSingle provider URL\tOnly one bailian.baseUrl in config\nCorrect endpoint\tURL is coding.dashscope.aliyuncs.com\nNo duplicate overrides\tmodels.json removed or aligned\nModel call succeeds\topenclaw models list works\nPrivacy/Safety\nNo API keys in audit output\nRedact key values (show first 4 chars)\nConfig files only, no external logging\nSelf-Use Trigger\n\nUse when:\n\nModel calls fail with endpoint errors\nConfig shows multiple provider definitions\nAfter gateway restart with model issues\nSilent fallback to wrong model detected\n\nOne route. One source of truth."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/Dalomeve/model-route-guard",
    "publisherUrl": "https://clawhub.ai/Dalomeve/model-route-guard",
    "owner": "Dalomeve",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/model-route-guard",
    "downloadUrl": "https://openagent3.xyz/downloads/model-route-guard",
    "agentUrl": "https://openagent3.xyz/skills/model-route-guard/agent",
    "manifestUrl": "https://openagent3.xyz/skills/model-route-guard/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/model-route-guard/agent.md"
  }
}