model-switch

Switch the Manager Agent's LLM model via persistent config after gateway reachability verification.

5.3k|652|Updated Feb 21, 2026
One-click install
npx skills add https://github.com/agentscope-ai/HiClaw --skill model-switch-agentscope-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: model-switch
Source: https://github.com/agentscope-ai/HiClaw/tree/main/manager/agent/skills/model-switch
Command: npx skills add https://github.com/agentscope-ai/HiClaw --skill model-switch-agentscope-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires bash, curl, jq, and includes scripts (resource) components.

What problem does it solve?

This Skill solves the problem of needing to change the Manager Agent’s LLM model on demand, without breaking runtime connectivity or leaving the system in an inconsistent configuration.

Core Features & Use Cases

  • Gateway reachability pre-check: Tests the target model via the AI Gateway and stops with a clear error if it’s unreachable.
  • Persistent configuration update: Updates the Manager’s model selection in the appropriate config file (OpenClaw openclaw.json or CoPaw providers/config).
  • Reasoning and context control: Supports toggling reasoning and setting context window and expected max tokens (or using an explicit override for unknown models).
  • Operational safety for admins: In failure cases, guides the admin to create a new AI Provider and AI Route rather than modifying the default provider.

Quick Start

Ask the human admin to run the model-switch skill with the desired model id and then restart the gateway to apply the persistent change.

Frequently Asked Questions about model-switch

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I change the Manager Agent's LLM model at runtime?

To change the Manager Agent's LLM model, you run the provided model-switch script with the desired model id, which verifies reachability via the AI Gateway and applies a persistent configuration update. If the script outputs RESTART_REQUIRED, you must restart the gateway to apply the change.

Can I set context window size and reasoning mode when switching the LLM model?

Yes, you can set context window size and toggle reasoning mode when switching the LLM model by passing optional flags during the update script execution. For unknown model ids, you must provide an explicit override for context window and expected max tokens.

What happens if the target model is unreachable through the AI Gateway during a model switch?

If the target model is unreachable through the AI Gateway, the model switch will stop and return a clear error. This pre-check prevents breaking runtime connectivity and ensures the system is not left in an inconsistent configuration.

Do I need bash, curl, and jq to switch the Manager's LLM configuration?

Yes, you need bash, curl, and jq installed in your environment to run the model-switch script, as these dependencies are required to test gateway reachability and update the persistent configuration files.

What should I do if changing the default provider fails during an LLM model switch?

If changing the default provider fails during an LLM model switch, you should create a new AI Provider and AI Route instead of modifying the default provider. This operational safety measure prevents breaking existing gateway connectivity.