models — Claude Code command: what it does, how to install
Lists available models in Weave Router and toggles them on or off directly through chat prompts.
Apache-2.0 ★ 5,622 updated 2026-11-10
.claude/commands/models.mdWhat models does
The command acts as an alias for /router-models. It inspects your Weave Router setup by running npx @weave-os/router models and prints deployed models grouped by provider. The output appears as a compact checklist with [x] and [ ] statuses, mirroring the router dashboard settings page.
You can pass model or provider identifiers to enable or disable them in one prompt. It also handles ranking: passing model IDs with prefer establishes a routing order, while prefer clear removes it. Disabling a model takes effect on the next routing decision without a restart.
On a Weave-hosted router instance, model selection belongs to the entire organization. The tool will display a plain catalog without toggles and direct you to edit settings at https://router.workweave.ai/models.
What it helps with
- inspect active models in Weave Router
- disable an entire model provider
- enable specific models by their ID
- rank routing preferences between models
Example prompts for the agent
- /models
- /models enable gpt-4o
- /models prefer claude-3-5-sonnet gpt-4o
How to install models
Manually: put the files in place
.claude/commands/models.mdCall it with /models. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/models.mdCall it with /prompts:models. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/models.prompt.mdManually: put the files in place
.gemini/commands/models.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about models
How to install models in Claude Code?
Place the command file at .claude/commands/models.md. If you use Codex, place it at ~/.codex/prompts/models.md.
What does the models command do?
It calls the Weave Router CLI using npx to display active models and update their routing availability.
Is a service restart required after modifying model availability?
No, state updates apply immediately on the router's next decision.
Source text
models.md · Apache-2.0
---
description: Alias for /router-models — list the models the Weave Router may route to, and turn them on or off.
argument-hint: [model or provider to enable/disable]
allowed-tools: Bash(npx:*)
---
Show me which models this installation lets the Weave Router pick from, and
change that selection when I ask. This is the same list — and the same stored
setting — as the checkboxes on the router dashboard's settings page.
Start by running:
`npx @weave-os/router models --claude{{SCOPE}}`
That prints every deployed model grouped by provider, with `[x]` for models the
router may pick and `[ ]` for models it may not. Present it back to me as a
compact checklist in that same `[x]` / `[ ]` form, keeping the provider
grouping and the exact model ids — I select models by id.
Then:
- If I named models or providers in `$ARGUMENTS`, work out whether I want them
on or off from how I phrased it, and apply it with
`npx @weave-os/router models enable <id>... --claude{{SCOPE}}` or
`npx @weave-os/router models disable <id>... --claude{{SCOPE}}` (add
`providers` before `enable`/`disable` to switch a whole provider). Several
ids can go in one call. Then re-run the list and show me the result.
- If I named nothing, stop after the list and ask which ones I want to change.
Don't change anything I didn't ask for.
Other things I might ask for:
- Rank models by preference:
`npx @weave-os/router models prefer <id> <id>... --claude{{SCOPE}}` (order
matters), or `npx @weave-os/router models prefer clear --claude{{SCOPE}}` to
drop the ranking.
- Providers only: `npx @weave-os/router models providers --claude{{SCOPE}}`.
If the command reports that this router doesn't expose model selection, that's
a Weave-hosted router: model selection belongs to the whole organization there,
so tell me to change it at https://app.weaveos.com/organization/settings/weave-router/models —
don't try to work around it. Its listing carries no on/off state, so present it
as a plain list; don't infer which models are enabled.
Disabling a model takes effect on the router's next routing decision; no
restart is needed.
© weave-os · Apache-2.0 · weave-os/router