[BUG] Case-sensitive model name "OpusPlan" accepted but doesn't switch to Opus in plan mode (v2.1.42)

Resolved 💬 3 comments Opened Feb 15, 2026 by waz-git Closed Mar 15, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Environment

  • Claude Code Version: 2.1.42
  • Platform: macOS (Darwin 24.5.0)
  • Model Setting Method: /model command and ~/.claude/settings.json

## Bug Description

When configuring the model name, case-sensitive variations produce
inconsistent behavior
:

  • OpusPlan (capital O, capital P): Accepted as valid, but **remains

on Sonnet 4.5 in plan mode** (doesn't work)

  • opusplan (lowercase): Accepted and **correctly switches to Opus

in plan mode** (works as expected)

The issue is that OpusPlan is silently accepted without any error or
warning, but fails to function correctly.

What Should Happen?

Expected Behavior

The system should handle this in one of two ways:

### Option A: Case-Insensitive Model Names
Both OpusPlan and opusplan should work identically:
``bash
/model OpusPlan # Should work
/model opusplan # Should work
/model OPUSPLAN # Should work
``

### Option B: Strict Validation with Clear Error Messages
Only the canonical form should be accepted:
``bash
/model opusplan # ✅ Accepted
/model OpusPlan # ❌ Error: "Unknown model 'OpusPlan'. Did you mean
'opusplan'?"
``

## Actual Behavior

  • OpusPlan is accepted without error ✅
  • Configuration is saved successfully ✅
  • No warning or error message ⚠️
  • Model doesn't switch in plan mode
  • Silently falls back to Sonnet 4.5 ❌

This silent failure creates confusion and makes debugging difficult.

Error Messages/Logs

Steps to Reproduce

## Steps to Reproduce

  1. Configure model to OpusPlan (with capital letters):

``bash
/model OpusPlan
# OR edit ~/.claude/settings.json:
# { "model": "OpusPlan" }
``

  1. Enter plan mode:

``bash
/plan
``

  1. Check the actual model being used:
  • Check environment info or model indicator
  • Observed: claude-sonnet-4-5-20250929 (Sonnet 4.5)
  • Expected: claude-opus-* (Opus 4.x)

## Verification Results

I verified this bug in my environment:

| Configuration | Plan Mode Model | Status |
|---------------|-----------------|--------|
| OpusPlan (capital) | Sonnet 4.5 ❌ | Bug reproduced |
| opusplan (lowercase) | Opus (expected) ✅ | Works correctly |

### Evidence
When plan mode was active with OpusPlan configuration:
``
You are powered by the model named Sonnet 4.5.
The exact model ID is claude-sonnet-4-5-20250929.
``

Expected: Should use Opus model for planning phase.

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.42

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

## Related Issues

  • #16183 - Model configuration "opusplan" not recognized in plan mode
  • #12834 - opusplan mode uses Opus 4.1 instead of Opus 4.5
  • #22218 - Add Support for opusplan Model in VSCode Extension

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗