ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified developer tools Safety 2/5

central-model-switch

OpenClaw 模型切换与救援技能。当模型 API 不可用时切换模型,或处理节点配对问题。触发词:模型切换、API用完、Central救援、节点掉线。⚠️ 使用前必须配置环境变量,详见变量说明。

Why use this skill?

Learn to manage model switching and node recovery for OpenClaw. Fix API outages and connectivity issues with this critical system administration skill.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/2233admin/central-model-switch
Or

What This Skill Does

The central-model-switch skill provides a robust management interface for the OpenClaw agent architecture, specifically designed to handle failover scenarios and connectivity issues. It enables users to programmatically toggle primary AI models when existing API endpoints become unresponsive or exhausted, and provides recovery protocols for gateway and node-pair issues. This skill acts as a bridge between the agent's core decision-making loop and the underlying system infrastructure, ensuring that high-availability requirements are met through automated reconfiguration scripts.

Installation

To integrate this skill into your environment, use the OpenClaw package manager:

clawhub install openclaw/skills/skills/2233admin/central-model-switch

Ensure that you have generated your SSH keys and have the necessary administrative privileges on your central server. Before execution, verify that your environment variables (CENTRAL_IP, SSH_KEY, API_KEY) are properly set in your profile, as these are critical for establishing secure, non-interactive connections to the gateway.

Use Cases

  • Model API Exhaustion: Quickly pivot to a more stable or cost-effective model (e.g., shifting from GPT-4 to a smaller, faster model) during rate limit spikes.
  • Node Recovery: Automatically perform cleanup of legacy node.json files and re-initialize connection strings when a node is disconnected from the central gateway.
  • Gateway Maintenance: Automate the restart sequence for openclaw-gateway to apply fresh configuration updates without manual shell intervention.
  • Emergency Failover: Execute rapid configuration changes when upstream model providers experience regional outages or service degradation.

Example Prompts

  • "Central救援,我的模型API额度用完了,请自动帮我切换到备用模型配置。"
  • "模型切换提示:当前连接不稳定,请重新执行节点配对流程并重启gateway。"
  • "节点掉线了,帮我清理旧的配对数据并连接到中央服务器进行重置。"

Tips & Limitations

  • Backups are Mandatory: Always ensure ~/.openclaw/openclaw.json.bak exists before modifying configurations. If a regex-based sed command goes wrong, it could corrupt your primary configuration, requiring manual restoration.
  • Environment Safety: Never hardcode your API_KEY in scripts. Utilize standard environment variable injections or secure secret management tools.
  • Permissions: This skill requires access to root or sudo-level commands to restart services. Ensure your SSH session is authenticated with keys that have proper sudoer permissions without requiring interactive passwords.
  • Monitoring: Always tail /tmp/gateway.log after triggering a switch to confirm the service successfully initialized with the new parameters.

Metadata

Author@2233admin
Stars1524
Views0
Updated2026-02-26
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-2233admin-central-model-switch": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#infrastructure#failover#model-management#openclaw#admin
Safety Score: 2/5

Flags: network-access, file-write, file-read, external-api, code-execution