[BUG] Claude Code "Invalid model name"

Resolved 💬 8 comments Opened Jul 1, 2025 by aleybovich Closed Jul 3, 2025

Environment

  • Platform (select one):
  • [ X] Anthropic API
  • Claude CLI version:1.035
  • Operating System:MacOS 15.5
  • Terminal: Mac terminal

Bug Description

I had MAx subscription for a month and used it with Claude Code. Yesterday that subscription expired and today I subscribed to Pro. I logged out in Claude Code, then logged back in and ran /model. I selected Sonnet (the only option) and tried a prompt. I got:

 API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"system: Invalid model name"}}

The workaround running claude --model claude-sonnet-4-20250514 works but it just hides the issue. Please fix the underlying problem. I see that many people switching to Pro get the same error.

Steps to Reproduce

  1. Have Max subscription expire
  2. Subscribe to Pro
  3. Try using Claude Code

Expected Behavior

It should work

Actual Behavior

Any promnpt causes error:
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"system: Invalid model name"}}

View original on GitHub ↗

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