Model routing
Select which gateway model runs a task, subagent, or agent-team teammate. Use when the user names a model for a piece of work — e.g. "use gpt-5.6-sol for this", "spawn a review subagent on <model>", "have one teammate use <model-a> and another use <model-b>", or "switch this session to <model>". Ensures the exact configured model name is passed through unchanged, with no invented aliases and no silent substitution.From its SKILL.md
npx -y skills add JuLius5838/agw --skill model-routingAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.5 KB, as published. Nobody here has run it
Agent Gateway — model routing
When the user asks for a specific model, route to it using the exact public
name the gateway exposes. Never invent role aliases (no team-review,
fast-model, etc.) and never silently substitute a different model.
Steps
-
Get the exact names the gateway serves:
agw models list --jsonUse a
namefrom that output verbatim. If the user's requested model is not listed, say so and stop — do not pick a "close" one. (--allalso shows inactive candidates, which are not usable until activated in setup.) -
Apply the name where the work runs:
- Main session:
claude --model <name>, or/model <name>inside a running session. Claude Code 2.1.218 shows one exact AGW custom-model entry in its picker; use direct exact selection for the other active names. - Subagent: pass
<name>unchanged as that subagent's model. - Agent-team teammate: spawn each teammate with its requested
<name>.
- Main session:
-
Teammate models are fixed at spawn. Changing the lead's
/modeldoes not change teammates that are already running; spawn a replacement to change one. -
Verify routing after spawn. Correlate each spawned agent's id with the public name/provider actually used (via
agw status/ sanitized proxy evidence). If Claude's managedavailableModelsallowlist substituted a different model before the request reached the gateway, report that mismatch — do not present the fallback run as the requested-model run. -
Surface errors, don't paper over them. If a model is unauthorized, unavailable, removed upstream, or tool-incompatible, report the failure under its exact public name and provider. The gateway never falls back to another model.
Example requests this handles
Spawn a review subagent using gpt-5.6-sol for this change.
Create two teammates: use gpt-5.6-sol for implementation and <other-model>
for review. Wait for both and summarize their results.