Scion Fleet Model Assessment & Live-Switching (`scion-agent-models`)
This skill provides operational procedures, architectural guidelines, and executable scripts for auditing LLM model assignments and Vertex AI region routing across Scion Hub projects, detecting Hub/project override traps (ANTHROPIC_MODEL, defaultModel, regional 429s), and live-switching running agent models.
1. Prerequisites
scionCLI installed and authenticated:Terminal window scion hub auth login --hub-url https://<your-hub-domain>/ --no-browserjqandcurlavailable inPATH.- Cached credentials present in
~/.scion/credentials.json.
2. Helper Scripts
scripts/hub-model-audit.sh— Audits Hub-scoped environment variables (ANTHROPIC_MODEL,CLOUD_ML_REGION,GOOGLE_CLOUD_REGION), global harness configs, project default annotations (scion.io/default-model,scion.io/default-harness-config), and running agents.scripts/hub-model-patch.sh— Switches models on Scion agents: usesPATCH /api/v1/agents/{id}whenphase == "created", sends live/model <model>commands (raw: true) to running Claude Code sessions whenphase == "running", and supports--restart-containers(stop+start) so running containers pick up updated Hub/project environment variables (CLOUD_ML_REGION=global).
3. The 5-Tier Model & Region Precedence Architecture
Understanding how Scion resolves models and Vertex AI endpoints prevents accidental fleet-wide overrides and regional 429 RESOURCE_EXHAUSTED errors:
- Container Environment Overrides (Highest Precedence — Common Trap):
- Inside
scion-claude,harnesses/claude/provision.pyonly setsANTHROPIC_MODEL = SCION_MODELifANTHROPIC_MODELis not already present in the container environment. - Rule: Never set a static
ANTHROPIC_MODELatscope=huborscope=project(DELETE /api/v1/env/ANTHROPIC_MODEL?scope=hub&scopeId=<hubId>), or it will override every template and agent model setting. - Vertex AI Region: Anthropic models (
claude-opus-5-5@default,claude-opus-4-8) require theglobalVertex AI endpoint (CLOUD_ML_REGION=global,GOOGLE_CLOUD_REGION=global,GOOGLE_CLOUD_LOCATION=globalwithinjectionMode: "always"atscope=hub). Regional endpoints (us-east5,us-central1) frequently return429 Quota exceeded.
- Inside
- Explicit Agent Config (
agent.appliedConfig.model):- Passed at creation time (
scion start --model ...) or inherited from the agent's template (scion-agent.yaml).
- Passed at creation time (
- Project Default Model (
project.annotations["scion.io/default-model"]):- Rule: Keep project
defaultModelempty ("") on multi-tier agent teams! Setting a project-widedefaultModeloverrides harness defaults for every worker template that leavesmodelunset (e.g. forcing alldeveloperorqa-testeragents onto Opus).
- Rule: Keep project
- Template
scion-agent.yaml(model&default_harness_config):- Pin
model: "claude-opus-5-5@default"anddefault_harness_config: "claude"oncoordinator(andeng-managerif desired), while leaving worker templates unset so they inherit from their harness config.
- Pin
- Harness Config Default (
GET /api/v1/harness-configs):- Configure
claudewithmodel: "claude-opus-5-5@default"andantigravitywithmodel: "Gemini 3.8 Flash (Medium)".
- Configure
4. Core Workflows
Workflow 1: Fleet Model & Region Audit
# Full fleet audit (Hub env vars, harness configs, projects, and agents):./scripts/hub-model-audit.sh --hub https://<your-hub-domain>/
# Audit specific template role across projects (e.g. all coordinators):./scripts/hub-model-audit.sh --hub https://<your-hub-domain>/ --template coordinator
# Audit specific project:./scripts/hub-model-audit.sh --hub https://<your-hub-domain>/ --project <project-slug-or-id>
# Programmatic / JSON output:./scripts/hub-model-audit.sh --hub https://<your-hub-domain>/ --jsonWorkflow 2: Live-Switching Running Agents & Refreshing Container Env Vars
Because PATCH /api/v1/agents/{id} only allows config.model modifications when phase == "created", running Claude Code agents (phase == "running") must be switched in-place via POST /api/v1/agents/{id}/message using structured_message with "raw": true ({"structured_message": {"msg": "/model <model-id>", "raw": true}} followed by {"structured_message": {"msg": "Enter", "raw": true}}, or via the CLI scion message <agent> --project <slug> --raw "/model <model-id>" + "Enter"). Note that top-level "raw": true outside structured_message is ignored by the Hub API and delivered as a chat message envelope.
Claude Code Version Gate (>= 2.1.280 for claude-opus-5-5):
- Vertex AI rejects
claude-opus-5-5@default(and theopusalias, which resolves to Opus 5 in Claude Code2.1.270) withHTTP 400 claude_code_version_too_old(Claude Code 2.1.270 does not support this model; version 2.1.280 or newer is required) if thescion-claudecontainer image has Claude Code< 2.1.280. - Verify the container's Claude Code version with
scion look <agent> --project <slug>. If the container runs Claude Code< 2.1.280, switch the agent toclaude-opus-4-8(--model claude-opus-4-8) untilscion-claudeis rebuilt with Claude Code>= 2.1.280.
Furthermore, if you updated Hub or project environment variables (such as setting CLOUD_ML_REGION=global), existing Docker containers retain their old os.Environ() (CLOUD_ML_REGION=us-east5) until recreated via stop + start (--restart-containers), which preserves the workspace and .claude conversation (--resume).
A. Preview Changes (Dry-Run)
./scripts/hub-model-patch.sh --hub https://<your-hub-domain>/ \ --template coordinator \ --model claude-opus-5-5@default \ --dry-runB. Live-Switch a Single Running Coordinator
./scripts/hub-model-patch.sh --hub https://<your-hub-domain>/ \ --agent <agent-id> \ --model claude-opus-5-5@defaultC. Recreate Containers (Pick Up CLOUD_ML_REGION=global) & Switch Model Across All Coordinators
./scripts/hub-model-patch.sh --hub https://<your-hub-domain>/ \ --all --template coordinator \ --restart-containers \ --model claude-opus-5-5@default