> ## Documentation Index
> Fetch the complete documentation index at: https://docs.llmeasy.ru/llms.txt
> Use this file to discover all available pages before exploring further.

# How to switch Sonnet and Opus in Claude Code

> Understand /model, model aliases, full model IDs, provider differences, and cost impact in Claude Code.

## Short answer

When switching Sonnet, Opus, or another model in Claude Code, prefer the supported `/model` entry point or the official model configuration path.

Model aliases, full model IDs, and provider mappings are not always identical. A marketing name shown in a web UI is not always the API-recognized model ID.

If you use a third-party gateway, use the model ID shown by that gateway or provider documentation.

## When this matters

* You want to switch between cheaper and stronger models
* You see Sonnet / Opus / Haiku aliases but do not know what to enter
* You use a third-party Base URL or model gateway
* You want to control Claude Code token cost
* You see model not found or model selection does not take effect

## Three layers of model names

| Layer        | Meaning                                       |
| ------------ | --------------------------------------------- |
| Display name | Human-friendly name shown in a UI             |
| Alias        | Short name or shortcut inside a tool          |
| Model ID     | The identifier actually recognized by the API |

What matters for a successful request is whether the current provider recognizes the Model ID.

## Recommended practice

1. Confirm which models the current provider supports.
2. Use Claude Code `/model` or the official model configuration path.
3. If you use a third-party gateway, copy the available model ID from its model plaza.
4. Consider model choice and cost together.
5. Do not guess model names by hand.

## About LLMEasy

If you connect Claude Code through LLMEasy, copy the current model ID from the <a href={"https://www.llmeasy.ru/pricing"}>model plaza</a>. Claude Key group and GPT Key group models belong to different protocol paths, so do not mix them.

Model choice affects quality, speed, and cost. Usage records help you compare actual consumption across models.

## Related docs

* [Why Claude Code uses so many tokens](/en/faq/token-cost/claude-code-token-usage)
* [How to configure API Key and Base URL in Claude Code](/en/faq/claude-code/api-key-base-url)
* [Claude Code permissions and hooks](/en/faq/claude-code/permissions-and-hooks)
* [OpenAI-compatible API vs Anthropic-compatible API](/en/faq/concepts/openai-compatible-vs-anthropic-compatible)

## References

* [Claude Code model configuration](https://docs.anthropic.com/en/docs/claude-code/model-config)
* [Claude Code CLI reference](https://docs.anthropic.com/en/docs/claude-code/cli-reference)
* [Claude Code costs](https://docs.anthropic.com/en/docs/claude-code/costs)
