Skip to content

Model automatically switched to haiku cc-switch

Quick fix

Built-in Claude Code behavior: haiku reads files. cc-switch only manages environment variables and does not change model selection.

Error output
我已经通过/model定义了模型是sonnet4.6,但是一开始问问题之后,模型就自动切换到了haiku上

这个是什么原因呢?在未使用ccSwitch,走自己的环境变量时没有这个问题
English translation

I set the model to sonnet4.6 with /model, but after I started asking questions, the model automatically switched to haiku. What is the cause? This issue does not occur when not using ccSwitch and using my own environment variables.

In #1389, the user set the main model to sonnet4.6 with /model, but after asking a question the model appeared to switch to haiku. This did not happen without ccSwitch when using their own environment variables. The maintainer replied that the haiku model is used for reading files and this is built-in Claude Code behavior; cc-switch only helps configure settings and does not change model usage. The root cause is not environment variable injection or a cc-switch configuration error, but Claude Code's own model division of tasks.

Other issues in this cluster are different environment-variable topics and should not use this page's conclusion: #614 (macOS remote server Claude environment variable configuration unsupported), #833 (Ubuntu still requires setting environment variables in bashrc after configuring cc-switch), #148 (Codex env_key), and #506 (injecting different environment variables into multiple sessions).

  1. No change to cc-switch or environment variables is required. This is built-in Claude Code file-reading model behavior. The main model remains set to sonnet4.6 by /model.

ToolClaude Code
VersionUnknown
PlatformsmacOSLinux
What is the cause?
The haiku model is used for reading files. This is built-in Claude Code behavior. cc-switch only helps configure settings and does not change model usage.

This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.