Bug Report: Cursor Settings Incorrectly Requires Anthropic API Key When Using OpenAI
Summary
When attempting to configure an OpenAI API key in Cursor settings, the application incorrectly indicates that an Anthropic API key is also required or present, even when none has been defined.
Environment
Application: Cursor IDE
Platform: [Your OS - macOS/Windows/Linux]
Version: [Your Cursor version if known]
Steps to Reproduce
Open Cursor IDE
Navigate to Settings/Preferences
Input a openai api key
Notice below that there is no switch/checkbox for the Anthropic api key.
Now when using claude-* models it says api key is invalid.
Hey, thanks for the report. This looks like a UI bug.
To share as much info as possible with the team so they can fix it, we’ll need some diagnostics:
DevTools check (most important):
Open DevTools: Help > Toggle Developer Tools
Go to Settings > Models > API Keys (with DevTools open)
In the Console tab, take a screenshot if you see any red errors
In the Elements tab, right-click the area where the Anthropic toggle should be > Inspect. Check if there’s even an HTML element for “Anthropic API Key” in the DOM tree
Send screenshots of the DevTools Console and Elements panels
Also try:
Fully restart Cursor. This sometimes helps with UI glitches
Check if it works after the restart
Once you send the DevTools screenshots, I’ll pass them to the team for a fix. JS console errors or a missing DOM element will show where the issue is in the code.
Hey.
There are several error messages in console. Its hard to see which is relevant.
The div that should contain the checkbox is not present.
I have restarted cursor several times.
Thanks for the DevTools screenshot, it really helps. I can see the div for the Anthropic key is actually empty, which confirms a UI bug.
I’ll pass this to the team to fix. Before I file a ticket, can you try a couple more quick checks to help us diagnose it?
Check extensions:
Open the Command Palette CMD+Shift+P
Type Developer: Open Extension Monitor
See which extensions are active
Try launching Cursor from the terminal with --disable-extensions
Go to Settings > Models > API Keys. Does the item show up?
Console errors:
I can see a few errors in the console in your screenshot. Can you share a full, zoomed-in screenshot of the console so we can read the whole error text? I’m especially interested in errors that appear right when you open Settings > Models.
Also, please try updating to the latest version. The bug might already be fixed.