Claude Code CLI 配置上下文大小
最近在使用 Claude Code CLI 时,会弹出一行警告:
"glm-5.1" is not a model this version of Claude Code recognizes, so auto-compact will keep this session within 200k tokens (the context window it assumes). If the model accepts more, append [1m] to the model name for 1M, or set CLAUDE_CODE_MAX_CONTEXT_TOKENS to its real window; to make it recognized, map it in the modelOverrides setting or update Claude Code; CLAUDE_CODE_DISABLE_UNKNOWN_MODEL_WINDOW_ENFORCEMENT=1 restores the previous wait-for-the-API behavior.

在 CC Switch 中配置参数CLAUDE_CODE_MAX_CONTEXT_TOKENS,填入模型匹配的上下文窗口大小值即可
