Model Configuration and Routing for Openclaw

A technical capability designed to configure, switch, and troubleshoot model providers, routing sessions, and cron executions in OpenClaw.

hohobohan
v1.0.0
Jun 3, 2026
0
533
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install hobohan-model-config

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 hobohan-model-config 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 Configuration and Routing?

The model-config skill is an essential capability for managing AI model providers, resolving routing conflicts, and handling session model locks within your agent ecosystem. In the realm of Openclaw Skills, ensuring that your agents consistently route to the correct Large Language Model (LLM) is paramount for robust operation, preventing common integration failures like cold-starts or stuck sessions.

By leveraging this skill, developers gain deep architectural control over the model gateway. It streamlines provider setups (such as DeepSeek or MiniMax), handles complex multi-agent routing using dmScope, and provides a structured methodology to switch models dynamically without interrupting existing agent workflows.

Model Configuration and Routing Use Cases

  • Setting up new API model providers (such as DeepSeek) directly inside the openclaw.json configuration.
  • Preventing session model lock traps when switching default models on running Telegram agents.
  • Pinning critical cron tasks to specific models to avoid execution timeouts caused by cold-start resolutions.
  • Routing multi-agent setups (e.g., Patch + Muthu) accurately using scoped Telegram channels.
  • Auditing and troubleshooting active model statuses across different sessions and gateway instances.

How Model Configuration and Routing Works

  1. Provider Resolution: The Gateway scans the config (openclaw.json) and active plugins, prioritizing plugins over manually configured providers for identical models.
  2. Session Locking: On session creation, a session locks to the active default model (its "birth model"). The session maintains this lock until a manual override occurs or the session expires.
  3. Cron Pinning: For timed automations, the system overrides default model resolution using explicit model keys within the JSON payload, ensuring deterministic and fast execution.
  4. Message Routing: Using the dmScope configuration, messages from multiple bots and users are isolated into distinct sessions to prevent crosstalk.

Model Configuration and Routing Setup

To configure model providers, update your openclaw.json configuration file:

{
  "providers": {
    "deepseek": {
      "apiKey": "sk-...",
      "baseUrl": "https://api.deepseek.com"
    }
  }
}

Verify and check active models or session statuses using the command-line interface:

# Check the current globally active model
openclaw status

# Query the active session-level model
session_status

To list all loaded model plugins and config providers:

openclaw plugin list | grep -i model
grep -A5 '"providers"' ~/.openclaw/openclaw.json

Model Configuration and Routing Data Schema & Taxonomy

The configuration and state are organized across these files and command-line interfaces:

Configuration Type Target Location Description
Global Gateway Configuration ~/.openclaw/openclaw.json Stores provider keys, base URLs, fallback chains, and routing parameters.
Session Status Information In-memory / Database state Managed via session_status, tracking individual session-to-model associations.
Cron Payload Schema Scheduled Cron Config Defines the specific model override (e.g., "model": "deepseek/deepseek-v4-flash") to bypass cold starts.

Multi-Agent Routing Configuration

Use the following dmScope inside your openclaw.json to organize Telegram multi-agent environments:

{
  "telegram": {
    "dmScope": "per-channel-peer-account"
  }
}

Model Configuration and Routing Advanced Features

  • Dynamic Session Switching: Send the /model <provider/model> command inside an active session to instantly force-switch the underlying model without restarting the gateway.
  • Multi-Agent Isolation: Configure dmScope to per-channel-peer-account to ensure that parallel bots run on isolated conversation paths.
  • Time-Sensitive Cron Pinning: Explicitly override model selections inside cron payloads to avoid up to 300-second latency bottlenecks associated with cold-start resolutions of default models.
  • Plugin vs. Provider Priority Engine: Automatically resolves model handlers with a hierarchical prioritization strategy (plugin providers > config providers > default fallbacks).

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*