← 返回 Skills 市场
hohobohan

Model Config

作者 Hobohan · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
27
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install hobohan-model-config
功能描述
Configure and troubleshoot OpenClaw model providers, routing, session model locks, cron model pinning, and provider switching. Lessons from real failures.
使用说明 (SKILL.md)

Model Configuration

Everything about configuring models in OpenClaw — providers, routing, sessions, and cron pinning. Learned the hard way through many errors.

Provider setup

Adding a provider

Edit openclaw.json:

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

If using API key from file: reference env var or key file. Direct env var injection via ~/.openclaw/openclaw.json.

Never restart gateway and immediately assume the model is live. Check after restart.

Checking what model is active

openclaw status           # shows current model
session_status            # shows session-level model

Provider priority

If multiple providers offer the same model, Gateway resolves via: plugin providers > config providers > default fallback chain. A DeepSeek plugin can sit alongside a MiniMax config provider — the plugin wins if enabled.

The session model lock (most common mistake)

The trap: When you change the default model in config, the current Telegram session stays locked to its birth model — the model that was default when the session was created.

Session created at 18:05 → model = MiniMax (was default)
Gateway restarted at 18:06 → config now says DeepSeek
Session at 18:07 → STILL MiniMax ← TRAP
New session created at 18:08 → DeepSeek ← Correct

The fix:

  • Existing sessions keep their model until the session expires or is reset
  • /model \x3Cprovider/model> — force-switches the current session immediately
  • For Telegram: sending a message to a brand new session (or after session expiry) picks up the current default
  • Closing and reopening a Telegram chat does NOT reset the session (Telegram chats can't be "closed")

Lesson: After changing model config, either:

  1. Send /model deepseek/deepseek-v4-flash to switch running session
  2. Wait for session to expire naturally (~24h inactivity)
  3. Accept that cron sessions (always new) will use new config immediately

Cron model pinning (second most common mistake)

Time-sensitive cron jobs MUST pin the model explicitly. The global default can get stuck on model cold-start resolution (MiniMax especially bad — up to 300s delay).

{
  "payload": {
    "kind": "agentTurn",
    "message": "...",
    "timeoutSeconds": 600,
    "model": "deepseek/deepseek-v4-flash"
  }
}

Crons that ALWAYS need pinning:

Cron Why
Expense check-ins (10am, 1:30pm, 10pm) Time-sensitive, Hobo waits for them
Expense sync (9:30am) Must run on schedule
News briefings (7:30am, 3pm, 10pm) Hobo expects them on time
Investment check-in (Sat 10am) Weekly, must fire
Investment sync (Sat 11am) Same
Transport check-in (9am) Previous-day ask

Crons that don't need pinning:

  • Dashboard regeneration, token tracker, backup, security audit — delay is harmless

Failure symptom: lastDiagnostics.summary = "cron: job execution timed out (last phase: model-call-started)". Fix: pin model.

dmScope (multi-agent routing)

In multi-agent setups (Patch + Muthu), messages can route to the wrong agent's session unless dmScope is set correctly:

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

per-channel-peer-account — each Telegram bot + user combo gets its own session. Without this, messages from both bots could land in the same session.

Symptom of wrong dmScope: Hobo messages Patch but Muthu's session receives them, or vice versa.

Plugins vs config providers

  • Plugins (installed via ClawHub or openclaw): can introduce new model providers
  • Config providers (in openclaw.json): directly configured API endpoints
  • Both can coexist. Plugin providers take priority over config providers for same model.

To check loaded providers:

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

Model switching during session

Method Scope Persistence
/model deepseek/deepseek-v4-flash Current session only Until session expires
Change "model" in openclaw.json All new sessions Permanent (requires gateway restart)
Pin "model" in cron payload That cron only Permanent until changed

Safety checklist (when changing models)

  1. Edit openclaw.json → add/change provider + model
  2. Restart gateway: openclaw gateway restart
  3. CHECK: openclaw status — confirms the new model is live
  4. CHECK: Send a test message — verify which model responds
  5. If wrong model responds → /model \x3Ccorrect/provider/model>
  6. Update cron pinning for any time-sensitive crons
  7. Verify cron test runs pick up the new model (check lastRunStatus)
安全使用建议
Before installing, understand that this skill may guide an agent through changing OpenClaw model configuration, cron model pins, and provider settings. Use it only where the agent is allowed to inspect or edit OpenClaw config and handle provider API keys.
能力标签
requires-sensitive-credentials
能力评估
Purpose & Capability
The stated purpose is model provider configuration and troubleshooting, and the artifact content stays within that scope: provider setup, session model locking, cron model pinning, routing scope, and model switching.
Instruction Scope
The skill includes user-directed commands and configuration edits involving OpenClaw status, plugins, cron payloads, gateway restart, and openclaw.json; these are disclosed and aligned with the purpose but can affect runtime behavior.
Install Mechanism
The package contains only markdown files, with no executable scripts, dependency installs, or automatic setup behavior.
Credentials
The sensitive-credentials tag is appropriate because the guidance discusses API keys and provider configuration, but it does not instruct credential exfiltration or unrelated access.
Persistence & Privilege
The skill discusses persistent configuration changes such as model defaults and cron model pins; these are explicit, user-controlled, and proportionate to model configuration management.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install hobohan-model-config
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /hobohan-model-config 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release. Provider setup, session model lock trap, cron model pinning, dmScope routing, plugins vs config, model switching guide, safety checklist.
元数据
Slug hobohan-model-config
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Model Config 是什么?

Configure and troubleshoot OpenClaw model providers, routing, session model locks, cron model pinning, and provider switching. Lessons from real failures. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 27 次。

如何安装 Model Config?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install hobohan-model-config」即可一键安装,无需额外配置。

Model Config 是免费的吗?

是的,Model Config 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Model Config 支持哪些平台?

Model Config 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Model Config?

由 Hobohan(@hohobohan)开发并维护,当前版本 v1.0.0。

💬 留言讨论