Guides

Try and switch models

Pull any model from any provider into your coding tool, and swap it mid-thread without restarting.

Because every model behind your accounts sits behind one key, trying a new one is a one-word change, not a reconfiguration. This guide covers two things: reaching a specific model, and switching models without losing your place in a thread.

Every model is one string

Ask the gateway what you can call and it returns the full list:

curl https://openllm.sh/v1/models \
  -H "Authorization: Bearer sk-llm-YOUR_KEY"

There are two kinds of id in that list:

  • Tier aliases resolve to a real model through your fallback chain. lite, plus, and ultra are the presets, but any alias you have renamed or created yourself shows up here too. Use these for everyday work.
  • Full model ids in provider/model form, like claude_code/claude-opus-4-8, chatgpt/gpt-5.6-sol, or grok/grok-4.5, pin exactly one model with no fallback. Use these when you want to test a specific model.

You only see the models your own connected accounts can serve, so the list is your accounts, not a catalog you have to buy into.

Try a new model

To point a single request at one specific model, pass its full id as the model:

curl https://openllm.sh/v1/chat/completions \
  -H "Authorization: Bearer sk-llm-YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "grok/grok-4.5",
    "messages": [{"role": "user", "content": "Refactor this function."}]
  }'

The moment a provider ships something new, it shows up in /v1/models and you can call it the same day: GPT, Claude, Grok, Gemini, Qwen, and the rest, all through the accounts you already connected. No new SDK, no new key, no new base URL.

Switch models inside your coding tool

You do not have to leave your agent to change models. Each tool exposes the same model ids the gateway does.

Claude Code

Type /model followed by a tier or a full id, and the rest of the thread runs on the new model:

/model ultra
/model chatgpt/gpt-5.6-sol

If you installed the OpenLLM CLI plugin, the same picker is available as /m- autocomplete: start typing /m- and fuzzy-match the live model list, then pick one to print the exact /model line. That list stays in sync with /v1/models, so new models appear in the picker automatically.

Codex, Kimi CLI, Raycast

The setup installer for each tool writes your activated models into that tool's own config, so they appear in its native model switcher. Pick a different one there and the tool sends the new model id to the gateway on the next turn. See Connect your tools for what each installer writes.

Switching mid-thread keeps your context

Changing the model does not reset the conversation. The messages already in the thread travel with the next request, so you can start a task on a fast, cheap model and escalate to a stronger one for the hard part without re-explaining anything:

  • Draft and scaffold on lite or a mini model.
  • Switch to ultra (or a specific claude_code/claude-opus-…) when the reasoning gets hard.
  • Drop back down once you are past it.

The only thing to keep in mind is the context window: each model has its own context_window in the /v1/models output, and a smaller model may not accept a thread that a larger one has grown. If a switch is rejected for size, move to a model with a bigger window or start a fresh thread.

On this page