[Bug] Anthropic API Error: Invalid Credentials for Opus Model from Claude Code
Bug Description
When I use Claude Code, and try to select Opus model (any model option except sonnet) I get an error in Claude code saying that API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"This credential is only authorized for use with Claude Code and cannot be used for other API
requests."},"request_id":"req_011CTRmwG267ubADdXiJtxwF"}\
This is not true. I use this model from Claude Code. Please fix it. Hope that I can continue working with Opus model from here! Good luck and wish you success in finding root cause of this problem! Yours sincerely, Loyal Customer That Wants To Make Your Product Better!!
As a user currently I can work only with claude-sonnet-4-20250514 from Claude Code
Environment Info
- Platform: win32 (Windows 11 x64)
- Terminal: vscode
- Version: 1.0.120
- Feedback ID:
Errors
[{"error":"AbortError: The operation was aborted\n at abortChildProcess (node:child_process:759:27)\n at AbortSignal.onAbortListener (node:child_process:829:7)\n at [nodejs.internal.kHybridDispatch] (node:internal/event_target:827:20)\n at AbortSignal.dispatchEvent (node:internal/event_target:762:26)\n at runAbort (node:internal/abort_controller:488:10)\n at abortSignal (node:internal/abort_controller:459:3)\n at AbortController.abort (node:internal/abort_controller:507:5)\n at Timeout._onTimeout (/npm/node_modules/@anthropic-ai/claude-code/cli.js:3696:4161)\n at listOnTimeout (node:internal/timers:608:17)\n at process.processTimers (node:internal/timers:543:7)","timestamp":"2025-09-23T18:05:41.952Z"},{"error":"AxiosError: Request failed with status code 403\n at MN (/npm/node_modules/@anthropic-ai/claude-code/cli.js:715:1077)\n at Unzip.J0 /AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:716:9955)\n at Unzip.emit (node:events:520:35)\n at Unzip.emit (node:domain:489:12)\n at endReadableNT (node:internal/streams/readable:1701:12)\n at process.processTicksAndRejections (node:internal/process/task_queues:90:21)\n at OQ1.request /AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:718:2088)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async KB5 (/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1986:480)\n at async Promise.all (index 0)\n at async file @anthropic-ai/claude-code/cli.js:1972:6855","timestamp":"2025-09-23T18:09:36.143Z"}]This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗