Skip to content
BENIBIX Learn

CLAUDE_CODE_DISABLE_LEGACY_MODEL_REMAP

AI⌨️ Claude CodeConfiguration

Also known as CLAUDE_CODE_DISABLE_LEGACY_MODEL_REMAP=1

Set to 1, it keeps old Opus 4 names from moving to the new Opus.

Think of it like

It is like you ask the shop not to swap your old book for the new one.

Example

Lucy is checking how an old test ran on Opus 4.1. With this set, her request really goes to Opus 4.1, not to the newest Opus.

Why it matters

To test against an old model, you need that old model, not the new one in its place.

Definition

CLAUDE_CODE_DISABLE_LEGACY_MODEL_REMAP set to 1 keeps Opus 4 and 4.1 as they are. By default, Claude Code swaps them on the Anthropic API. You ask for one, and you get the newest Opus. On Bedrock, Google Cloud or Foundry there is no swap at all.

Example code

bash
export CLAUDE_CODE_DISABLE_LEGACY_MODEL_REMAP=1
claude --model claude-opus-4-1
Ask for Opus 4.1 and get it.

Common mistake

Setting it on Bedrock to stop a swap. There is no swap there to stop.

Key takeaways

  1. 1
    Opus 4 and 4.1. The only ones moved.
  2. 2
    Anthropic API only. Not cloud providers.
  3. 3
    1 stops it. You get what you ask for.