SuperAPI AI Directory

agent-model-switcher

Agents & models

View repository

Updated 10-15 13:37

About this skill

Agent Model Switcher

Batch switch the model configurations of all sub-agents.

Purpose

  • Batch change the model of all sub-agents
  • Synchronize the models.json configuration of all agents
  • View the current model configuration of all agents

Usage

1. View the model configuration of all agents

python3 ~/clawd/skills/agent-model-switcher/switch_model.py list

2. Change the model of all sub-agents (excluding main)

python3 ~/clawd/skills/agent-model-switcher/switch_model.py set <provider>/glm-5

3. Change the model of a specified agent

python3 ~/clawd/skills/agent-model-switcher/switch_model.py set <provider>/glm-5 --agents code,ops,quant

4. Synchronize the models.json of all agents (copy from main)

python3 ~/clawd/skills/agent-model-switcher/switch_model.py sync-models

5. Synchronize the models.json of a specified agent

python3 ~/clawd/skills/agent-model-switcher/switch_model.py sync-models --agents batch,law,xiaotu

Parameter Description

Parameter Description
list List the model configuration of all agents
set <model> Set the model of an agent
sync-models Copy models.json from main to other agents
--agents <names> Specify the agents to operate on (comma-separated)
--include-main Include the main agent (excluded by default)
--dry-run Only show the operations to be performed, without actually executing them

Common Models

Alias Full Name
glm5 /glm-5
glm47 /glm-4.7
opus46 /claude-opus-4-6
sonnet46 /claude-sonnet-4-6
kimi /kimi-k2.5

Examples

# 查看当前配置
python3 ~/clawd/skills/agent-model-switcher/switch_model.py list

# 全部子 agent 切换到 glm-5
python3 ~/clawd/skills/agent-model-switcher/switch_model.py set glm5

# 只切换 code 和 quant 到 opus-4-6
python3 ~/clawd/skills/agent-model-switcher/switch_model.py set opus46 --agents code,quant

# 同步 models.json 配置
python3 ~/clawd/skills/agent-model-switcher/switch_model.py sync-models

Notes

  1. After modifying the configuration, the agent needs to be restarted or wait for a new session for the changes to take effect
  2. Synchronizing models.json will overwrite the target agent's models.json, so make sure main's configuration is up to date
  3. It is recommended to first use --dry-run to view the operations to be performed