# CLAUDE_CODE_DISABLE_LEGACY_MODEL_REMAP

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

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** CLAUDE_CODE_DISABLE_LEGACY_MODEL_REMAP=1

## Think of it like

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

## 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

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.

## 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.

## Why it matters

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

## Common mistake

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

## Three principles

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

## Related terms

- [Claude Code Model Alias](https://learn.benibix.com/term/ai/claude-code-model-alias)
- [ANTHROPIC_MODEL](https://learn.benibix.com/term/ai/anthropic-model-variable)
- [Model Fallback](https://learn.benibix.com/term/development/model-fallback)

---

Source: https://learn.benibix.com/term/ai/claude-code-disable-legacy-model-remap-variable
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-16
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
