Gateway add model
Add or remove an external ChatGPT/Codex or GitHub Copilot model in Agent Gateway so it becomes selectable in Claude Code. Use when the user says things like "add gpt-5.6-luna", "enable a Copilot model", "make <model> available in the gateway", or "remove <model>". Uses the validated `agw models add` / `agw models remove` commands and never hand-edits the routing registry or invents model ids.From its SKILL.md
npx -y skills add JuLius5838/agw --skill gateway-add-modelAssembled 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
4.0 KB, as published. Nobody here has run it
Agent Gateway — add or remove a model
External models live in the validated registry ~/.config/agent-gateway/models.yaml.
Use the agw models commands to change it; never edit that file by hand and never
guess an upstream model id. A public name maps to exactly one active provider, and
the gateway never falls back to a different model.
Add a model
-
Get the exact model id. It must be the provider's real slug — never invented.
-
See what is already configured (active and inactive candidates):
agw models list --all -
For ChatGPT/Codex, obtain the exact slug from the user or the Codex CLI's model list. For Copilot, use an authoritative current Copilot/LiteLLM catalog or an exact slug supplied by the user. If you cannot confirm the exact id, stop and ask — do not guess. In particular, LiteLLM 1.93.0 has no cataloged Kimi slug; a product display name alone is not a routable id.
-
-
Add it. For a ChatGPT/Codex model the provider, upstream id, and mode default correctly, so the common case is just the exact name:
agw models add gpt-5.6-lunaFor a verified Copilot slug, make the provider and published mode explicit. The upstream prefix defaults to
github_copilot/when-p copilotis selected:agw models add gpt-4.1 --provider copilot --mode chatOptions when needed:
--display-name "GPT 5.6 Luna"— picker label only; never changes routing.--no-enable— add as a disabled candidate instead of activating it.--default— also make it the startup model (implies enable).--provider,--upstream-model,--mode— required when the provider, slug, or API mode differs from the ChatGPT defaults. Never infer mode from provider alone; use the exact model's published/cataloged mode.
The command validates the whole registry before writing; an invalid entry (bad name, wrong prefix, duplicate active name) fails without changing the file.
-
Authenticate the provider if it is not already:
agw auth chatgpt # ChatGPT/Codex agw auth copilot # GitHub CopilotFor Copilot,
agw auth copilotalso verifies the account has an active Copilot subscription and reports plainly if it has lapsed (the credential is still stored for when the plan is reactivated). -
Verify Claude compatibility. A model that fails here is unusable under that exact name — there is no fallback:
agw models verify gpt-5.6-luna -
Apply to a running session. A running gateway keeps its old registry until restarted:
agw proxy restartThen select it with
/model gpt-5.6-luna,claude --model gpt-5.6-luna, or per-agent routing (see themodel-routingskill).
Remove a model
agw models remove gpt-5.6-luna
If the same public name has candidates for more than one provider, disambiguate:
agw models remove gpt-5.6-luna --provider chatgpt
Removing the current default_model clears it back to native Claude selection when
no active entry with that name remains. Run agw proxy restart to apply the change
to a running gateway.
Rules
- Exact names only:
namehas no provider prefix;upstream_modelkeeps it. - One active provider per public name; the gateway never load-balances or falls back.
- Never invent a model id. If the exact slug is unknown, stop and ask.
- Enabling a model does not authenticate it or start the proxy — auth and verify before relying on it.