OpenAI API: Unexpected Opus 4 Availability Restriction in Pro Plan
Status Fixed / completed
Maintainer reply ✓ Yes — dicksontsai
Workaround ✓ Mentioned in thread ↓
Activity 8 comments · opened Jul 8, 2025 · closed Jul 24, 2025
💡 Likely answer: A maintainer (dicksontsai, collaborator)
responded on this thread — see the highlighted reply below.
Bug Description
It tells me that Opus 4 is not available with the Pro plan, but I want to use Sonnet. I don't know why it's using Opus when I already know that Opus isn't included in the Pro plan.
Environment Info
- Platform: linux
- Terminal: kitty
- Version: 1.0.44
- Feedback ID: 5878b2a5-d162-4429-ac91-aabe87d4e070
Errors
[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"system: Invalid model name\"}}\n at D6.generate (file:///home/samuelg/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1304:12578)\n at gq.makeStatusError (file:///home/samuelg/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1321:2100)\n at gq.makeRequest (file:///home/samuelg/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1321:5311)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async fA1.showErrors (file:///home/samuelg/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1690:23214)\n at async fA1 (file:///home/samuelg/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1690:12720)\n at async aR2 (file:///home/samuelg/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1690:23062)\n at async file:///home/samuelg/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1690:18138\n at async Y0A (file:///home/samuelg/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1690:5121)\n at async Vc (file:///home/samuelg/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1690:18108)","timestamp":"2025-07-08T15:43:36.096Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"system: Invalid model name\"}}\n at D6.generate (file:///home/samuelg/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1304:12578)\n at gq.makeStatusError (file:///home/samuelg/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1321:2100)\n at gq.makeRequest (file:///home/samuelg/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1321:5311)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async fA1.showErrors (file:///home/samuelg/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1690:23214)\n at async fA1 (file:///home/samuelg/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1690:12720)\n at async aR2 (file:///home/samuelg/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1690:23062)\n at async file:///home/samuelg/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1690:18138\n at async Y0A (file:///home/samuelg/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1690:5121)\n at async Vc (file:///home/samuelg/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1690:18108)","timestamp":"2025-07-08T15:45:01.578Z"}]
8 Comments
Can you try /logout and /login? Claude Code won't automatically pick up any subscription changes, such as Max->Pro downgrade.
I've started getting this error as well. I haven't changed plan. I have logged out and in once a couple of days ago. Worked fine, but need to do it again.
+1
Seeing this error locally from time to time (logout + login back helps as a workaround, but I never changed my plan),
as well as on Github Actions CI.
Any suggestions?
Yes, I'm seeing that warning
I logged out and it worked, thanks. Although I never changed my plan.
I met the same issue, and got it resolved by logging out and logging in again.
dicksontsai has misjudged the essence of the problem.
The real issue is that, even though the MAX plan isn’t being used, the system arbitrarily tries to employ Opus 4 and fails on its own.
Trying to make the user clean up that mess by logging off and logging back in is an evil laziness (a laziness not regarded as a virtue).
Shouldn’t we aim for a fundamental solution?
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.