From claude-commands
Overrides the model for `ao spawn` workers without editing the global config. Useful for one-shot swaps like forcing claude-sonnet-4-6 instead of project default GLM-5.1.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-commands:ao-model-overrideThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
`ao spawn` has **no `--model` CLI flag and no model env-var override**. Model is resolved purely from config layers in `packages/core/src/agent-selection.ts:103-111`:
ao spawn has no --model CLI flag and no model env-var override. Model is resolved purely from config layers in packages/core/src/agent-selection.ts:103-111:
worker model = project.modelByCli[agent].model
?? defaults.modelByCli[agent].model
?? project.worker.agentConfig.model
?? project.agentConfig.model
?? defaults.agentConfig.model
To override at spawn time without touching the user's config, point AO_CONFIG_PATH at a temp YAML that copies the user's config and patches the target project. The bashrc default AO_CONFIG_PATH=~/.hermes/agent-orchestrator.yaml is overridden for one process tree only.
Trigger phrases (any of these → reach for this skill):
tmux capture-pane of an AO worker shows GLM-5.1 with high effort and the user wanted something elseDo NOT use this skill when:
~/.hermes/agent-orchestrator.yaml)--agent <name>, not a model overrideThese are tempting dead ends. Save the time:
| Attempt | Why it fails |
|---|---|
ao spawn --model claude-sonnet-4-6 ... | No such flag in packages/cli/src/commands/spawn.ts. Options are only --agent, --runtime, --project, --claim-pr, --open, --decompose, --max-depth, --assign-on-github. |
ANTHROPIC_MODEL=claude-sonnet-4-6 ao spawn ... | agent-claude-code plugin builds its --model arg from resolved config.model, not env. Plugin only reads env for WAFER_* / MINIMAX_API_KEY auth, never for model selection. |
unset ANTHROPIC_BASE_URL before spawn | The bashrc ANTHROPIC_BASE_URL=http://localhost:9000 points to real Anthropic (transparent proxy — verify with curl localhost:9000/ → it returns the Anthropic API banner). It is NOT routing to GLM. The plugin strips and resets ANTHROPIC_BASE_URL itself based on model name. |
--agent wafer / --agent minimax | These are explicit provider plugins. They lock you to GLM-5.1 / MiniMax-M2.7 respectively. The opposite of what you want. |
claude-code Defaults to GLM in This SetupGlobal config ~/.hermes/agent-orchestrator.yaml has:
defaults:
modelByCli:
claude-code:
model: wafer.ai/GLM-5.1
agent-claude-code/src/index.ts:866-889 then routes by model name:
MiniMax-* → MiniMax endpointwafer.ai/* (isWaferModel) → https://pass.wafer.aiz.ai/* (isZaiModel) → https://api.z.ai/api/anthropicclaude-sonnet-4-6) → strips ANTHROPIC_BASE_URL and uses Anthropic OAuthSo setting model to a plain Anthropic ID (e.g. claude-sonnet-4-6) is sufficient to route to real Anthropic. The hard part is getting that model into the resolved config without mutating the user's file.
modelByCli (per-CLI) takes precedence over agentConfig.model (per-project). Either works; modelByCli is more surgical because it only affects --agent claude-code invocations.
Copy $AO_CONFIG_PATH (default ~/.hermes/agent-orchestrator.yaml) to a tmp file and add the override under the target project. Example using yq (preferred) or manual edit:
SRC="${AO_CONFIG_PATH:-$HOME/.hermes/agent-orchestrator.yaml}"
DST="$(mktemp -t ao-override-XXXX.yaml)"
cp "$SRC" "$DST"
PROJECT=mctrl-test
MODEL=claude-sonnet-4-6
# yq path:
yq -i ".projects.\"$PROJECT\".modelByCli.\"claude-code\".model = \"$MODEL\"" "$DST"
# Verify:
yq ".projects.\"$PROJECT\".modelByCli" "$DST"
Without yq, edit by hand under the project block:
mctrl-test:
modelByCli:
claude-code:
model: claude-sonnet-4-6
agentRules: |
...
AO_CONFIG_PATH="$DST" ao spawn -p "$PROJECT" --agent claude-code "<task description>"
The bashrc's export AO_CONFIG_PATH=$HOME/.hermes/agent-orchestrator.yaml is overridden for this single command's process tree only.
Within ~5 seconds of spawn:
SESSION=mt-XXX # from spawn output
TMUX_SESSION="$(ls ~/.agent-orchestrator/*-${PROJECT}/sessions/ 2>/dev/null | head -1)" # or grab from spawn output: "Attach: tmux attach -t ..."
tmux capture-pane -p -t "$TMUX_SESSION" -S -200 | grep -iE "model|sonnet|GLM|opus" | head -5
Expected line: Sonnet 4.6 with high effort · Anthropic OAuth (or similar).
Wrong: GLM-5.1 with high effort · API Usage Billing → override didn't take, re-check the YAML path.
Also verify via session metadata:
cat ~/.agent-orchestrator/*-${PROJECT}/sessions/${SESSION}/*.json 2>/dev/null | jq -r '.runtimeHandle.data.launchCommand' | head -1
Should contain --model 'claude-sonnet-4-6'.
rm -f "$DST"
Optionally ao session kill $SESSION if you only needed to verify, not produce work.
A canned helper lives at ~/.claude/skills/ao-model-override/spawn-with-model.sh. Usage:
~/.claude/skills/ao-model-override/spawn-with-model.sh \
--project mctrl-test \
--model claude-sonnet-4-6 \
--agent claude-code \
"Add a shout() function and tests under df_demo/"
The script handles the temp config build + cleanup automatically and prints the session name on success.
~/.hermes/agent-orchestrator.yaml directly for a one-shot test. The user has explicitly rejected this approach (2026-05-21).AO_CONFIG_PATH; this skill is the workaround.--agent codex when the user asked for "claude sonnet" — codex uses gpt-5.4, not Sonnet.~/.hermes/agent-orchestrator.yaml with throwaway model entries. Use the temp-config pattern.~/project_agento/agent-orchestrator/packages/cli/src/commands/spawn.ts~/project_agento/agent-orchestrator/packages/core/src/agent-selection.ts:103-111~/project_agento/agent-orchestrator/packages/plugins/agent-claude-code/src/index.ts:771-890~/project_agento/agent-orchestrator/packages/core/src/config.ts:287-330npx claudepluginhub jleechanorg/claude-commands --plugin claude-commandsEnforces strict parameter verification when spawning, steering, or auditing Agent Orchestrator workers. Use when the user specifies exact AO parameters like agent, runtime, project, or PR targets.
Rewires which AI CLI handles each role in cc-multi-cli-plugin, swaps CLIs, adds/disables subagents, and diagnoses CLI quirks via env vars and config files.
Creates Claude Code agents from scratch or by adapting templates. Guides requirements gathering, template selection, and file generation following Anthropic best practices (v2.1.63+).