huangjinlian615-star/hiclaw-test/model-switch

Claude Code and agent skill by huangjinlian615-star/hiclaw-test

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Switch the Manager Agent's own LLM model. Use when the human admin requests changing the Manager's model.

Install

npx vskill@latest install huangjinlian615-star/hiclaw-test/model-switch

SKILL.md

The same SKILL.md was published earlier as agentscope-ai/hiclaw/model-switch.

Model Switch

Switch the Manager's own LLM model. The script tests connectivity first, then patches openclaw.json.

Usage

bash
bash /opt/hiclaw/agent/skills/model-switch/scripts/update-manager-model.sh <MODEL_ID> [--context-window <SIZE>] [--no-reasoning]

Examples:

bash
bash /opt/hiclaw/agent/skills/model-switch/scripts/update-manager-model.sh claude-sonnet-4-6
bash /opt/hiclaw/agent/skills/model-switch/scripts/update-manager-model.sh my-custom-model --context-window 300000
bash /opt/hiclaw/agent/skills/model-switch/scripts/update-manager-model.sh deepseek-chat --no-reasoning

What the script does

  1. Strips any hiclaw-gateway/ prefix from the model name
  2. Tests the model via POST /v1/chat/completions on the AI Gateway — exits with error if unreachable
  3. If the model is already in the models array: switches agents.defaults.model.primary
  4. If the model is new: adds it to the models array and switches primary
  5. Always outputs RESTART_REQUIRED

After running the script

The script always outputs RESTART_REQUIRED. Run openclaw gateway restart to apply the change, then tell the human admin the switch is complete.

Reasoning control

By default, reasoning (extended thinking) is enabled. To disable it, pass --no-reasoning.

On failure

If the gateway test fails (non-200), the script outputs ERROR: MODEL_NOT_REACHABLE and exits. No changes are made to openclaw.json.

When you see this error, tell the human admin clearly:

  1. The model is not reachable because the current default AI Provider likely does not support it.
  2. They need to open the Higress Console and:
  • Create a new AI Provider for the model's vendor (e.g. kimi, deepseek, minimax).
  • Create a new AI Route with a model name prefix predicate (e.g. provider kimi → match kimi-*), so that requests for models with that prefix are routed to the new provider, while unmatched models continue to go through the default route.
  1. Do NOT modify the default AI Provider — it is managed by the initialization config and will be overwritten on restart.

After the admin confirms the provider and route are configured, you can retry the model-switch script.

Important

This skill switches the primary model (persisted in openclaw.json). After running the script, you must run openclaw gateway restart for the change to take effect. The human admin can also use the /model slash command to switch the current session's model instantly without restart, but that is non-persistent and only supports pre-configured models.

Switching to an unknown model

When the human admin requests switching to a model you don't recognize, you MUST:

  1. Ask the admin two questions before running the script:
  • "This model is not in the known list. What is its context window size (in tokens)?"
  • "Does this model support reasoning (extended thinking)?"
  1. Run the script with the appropriate flags:

``bash bash /opt/hiclaw/agent/skills/model-switch/scripts/update-manager-model.sh <MODEL_ID> --context-window <SIZE> [--no-reasoning] ``

  1. If the admin does not know the context window, use the default (150,000) by omitting --context-window.
  2. If the model does not support reasoning, add --no-reasoning.

Pre-configured models (for reference)

ModelcontextWindowmaxTokens
gpt-5.41,050,000128,000
gpt-5.3-codex / gpt-5-mini / gpt-5-nano400,000128,000
claude-opus-4-61,000,000128,000
claude-sonnet-4-61,000,00064,000
claude-haiku-4-5200,00064,000
qwen3.5-plus200,00064,000
deepseek-chat / deepseek-reasoner / kimi-k2.5256,000128,000
glm-5 / MiniMax-M2.7 / MiniMax-M2.7-highspeed / MiniMax-M2.5200,000128,000

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/huangjinlian615-star/hiclaw-test/model-switch/badge)](https://verified-skill.com/skills/huangjinlian615-star/hiclaw-test/model-switch)

Something wrong with this skill or its page? Tell us.