Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Hi everyone,
I’m trying to connect Cursor to Anthropic / Claude and I’m running into a model / API key issue that I can’t resolve.
I have an Anthropic account with a Claude Code workspace. Claude Code itself works correctly after running claude and /login.
In the Anthropic console, a claude_code_key_… key is created automatically for the Claude Code workspace.
I also created and tested a regular Anthropic API key in a small Python script (outside Cursor).
The script successfully calls Anthropic and returns a response.
The script reports the model used as: claude-sonnet-4-20250514.
So the key is valid and can use Sonnet 4 from Python.
The problem in Cursor
In Cursor’s settings I added my Anthropic API key.
In the Models section, I selected a Claude model labeled something like claude-sonnet-4-5.
When I run an agent/tab with that model, I get this popup:
“Invalid Model – The model claude-sonnet-4-5 does not work with your current plan or api key”
So the same key works in Python with claude-sonnet-4-20250514, but fails in Cursor when using claude-sonnet-4-5.
My suspicion
It looks like Cursor is using a shorthand model ID (claude-sonnet-4-5) that doesn’t match the exact Anthropic model ID (claude-sonnet-4-20250514) that my account is allowed to call. I don’t see how to make Cursor call the exact model ID that works in my Python script.
What I need help with
Is there a way in Cursor (on this version / Windows) to manually set the Claude / Anthropic model string to claude-sonnet-4-20250514 instead of claude-sonnet-4-5?
If not, which specific Claude model option in Cursor’s model list actually maps to claude-sonnet-4-20250514?
Has anyone with a similar setup (Cursor 2.2.20 on Windows and Anthropic API) hit this “does not work with your current plan or api key” error while the key works in a standalone script, and found a practical fix or configuration change?
Any concrete guidance, screenshots, or confirmation from others on the same Cursor version would be greatly appreciated. Thanks!
Steps to Reproduce
- Install Cursor on Windows 10 (Cursor Version: 2.2.20, VSCode 1.105.1, Electron 37.7.0, Node.js 22.20.0).
- Open Cursor and go to Settings → Models (or the Claude/Anthropic provider settings).
- Add an Anthropic API key that has been verified to work via a separate Python script using model
claude-sonnet-4-20250514. - In Cursor’s model list, select the model labeled
claude-sonnet-4-5for an agent/chat. - Start a new chat/agent run using this model.
Observed Result
- Cursor shows an error popup:
“Invalid Model – The model claude-sonnet-4-5 does not work with your current plan or api key.”
Expected Result
- Cursor should successfully call Anthropic using the configured key and model, or clearly indicate which exact Anthropic model ID should be selected/entered so that it matches
claude-sonnet-4-20250514.
Operating System
Windows 10/11
Current Cursor Version (Menu → About Cursor → Copy)
Version: 2.2.20 (user setup)
VSCode Version: 1.105.1
Commit: b3573281c4775bfc6bba466bf6563d3d498d1070
Date: 2025-12-12T06:29:26.017Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.26200
For AI issues: which model did you use?
claude-sonnet-4-5
claude-sonnet-4-20250514
claude-haiku-4-5
Does this stop you from using Cursor
No - Cursor works, but with this issue
