Describe the Bug
When using Claude 4 Opus MAX (with or without thinking), I eventually run into this error:
We encountered an issue when using your API key: Provider was unable to process your request API Error: ``` Request failed with status code 400: [{ "error": { "code": 400, "message": "API key not valid. Please pass a valid API key.", "status": "INVALID_ARGUMENT", "details": [ { "@type": "type.googleapis.com/google.rpc.ErrorInfo", "reason": "API_KEY_INVALID", "domain": "googleapis.com", "metadata": { "service": "generativelanguage.googleapis.com" } }, { "@type": "type.googleapis.com/google.rpc.LocalizedMessage", "locale": "en-US", "message": "API key not valid. Please pass a valid API key." } ] } } ] ```
Which is odd, given Claude is an Anthropic model.
Any idea how to solve this?
It interrupts the thread and the only way around the issue is to start a new thread (losing all context).
This happens even when I try to switch to using my own API key.
Steps to Reproduce
- Use Claude 4 Opus MAX in Cursor for long enough
Expected Behavior
Claude 4 Opus MAX (with our without thinking) works.
If I run into any rate limits, I am told.
If I can switch to using my own API key, I am told.
Operating System
MacOS
Current Cursor Version (Menu → About Cursor → Copy)
Version: 1.2.4
VSCode Version: 1.99.3
Commit: a8e95743c5268be73767c46944a71f4465d05c90
Date: 2025-07-10T16:53:59.659Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.5.0
Does this stop you from using Cursor
No - Cursor works, but with this issue

