Model Route Guard for Openclaw

A specialized diagnostic and repair tool designed to eliminate model routing conflicts and ensure consistent provider endpoint configurations.

dalomeve
v1.0.0
Mar 1, 2026
0
1.1k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install model-route-guard

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install model-route-guard using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Model Route Guard?

Model Route Guard is a technical utility for developers working with Openclaw Skills to maintain the integrity of AI model configurations. It identifies and resolves common routing issues such as duplicate provider definitions, conflicting agent-level overrides, and incorrect API endpoints that lead to silent fallbacks or failed model calls.

By enforcing a single source of truth across global and local agent settings, this skill ensures that your AI agents consistently connect to the correct provider infrastructure. It provides a robust workflow for auditing configuration files and applying automated fixes to stabilize the model execution environment.

Model Route Guard Use Cases

  • Troubleshooting failed model calls caused by incorrect provider baseUrl settings.
  • Eliminating configuration drift where agent-specific models.json files conflict with global settings.
  • Auditing the system after a gateway restart to confirm active routing paths.
  • Standardizing model endpoints across multiple agents to prevent redundant provider definitions.

How Model Route Guard Works

  1. The skill initiates a Route Audit by parsing the global openclaw.json and any local agent models.json files to extract provider endpoints.
  2. It performs a comparison between global and agent configurations to detect baseUrl mismatches or duplicate entries.
  3. Upon detecting a conflict, it executes a Fix workflow that updates the global configuration with the verified endpoint.
  4. It removes redundant or conflicting agent overrides to prevent local configuration from hijacking the global route.
  5. The skill triggers an Openclaw gateway restart to apply changes and verifies the fix using the models list command.

Model Route Guard Setup

To deploy the Model Route Guard within your environment, ensure you have the necessary CLI access. Follow these steps to prepare your Openclaw Skills configuration:

# Verify your current configuration directory exists
ls -d ~/.openclaw

# Ensure you have the latest gateway version for restart capabilities
openclaw status

Note: This skill relies on PowerShell logic for file manipulation but can be adapted for any shell that can read and write JSON configuration files.

Model Route Guard Data Schema & Taxonomy

Component Path / Key Description
Global Config ~/.openclaw/openclaw.json The primary configuration file containing global provider URLs.
Agent Override ~/.openclaw/agents/main/agent/models.json Local file that may contain conflicting provider definitions.
Provider URL bailian.baseUrl The specific endpoint being audited (e.g., coding.dashscope.aliyuncs.com).
Verification openclaw models list The command used to validate that the routing is operational.

Model Route Guard Advanced Features

  • Automated baseUrl validation against known-good provider endpoints.
  • Multi-layer configuration merging to prevent agent-level overrides from causing silent failures.
  • Security-first audit logs that redact sensitive API keys while preserving the first four characters for identification.
  • Deep-level JSON parsing to ensure configuration integrity during automated write operations.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*