When you enable custom OpenAI API key in cursor settings, OpenaAI models using this API key work fine,
But no model from other providers work, Claude, Gemini, Grok etc, they all fail with error that says Unauthorized or Invalid Key of some kind, as if it tried to use OpenAI key for every model there.
This is clearly not expected, instead it should use OpenAI key only for OpenAI model calls and Cursor subscription tokens for other models and tools
Steps to Reproduce
Cursor Settings → Models → Expand API Keys section
Paster OpenAI API Key, Enable the switch near it
Close settings, try asking GPT-5 agent something - it works
Now select any other model (i.e. Gemini 2.5 Pro) and submit request, it will error out with text API key not valid. Please pass a valid API key
Expected Behavior
It should use OpenAI key only for OpenAI model calls and Cursor subscription tokens for other models and tools
Operating System
Windows 10/11
Current Cursor Version (Menu → About Cursor → Copy)
Thanks for the report. When you enable your OpenAI API key, it’s mistakenly applied to all models. As a result, subscription models (Claude, Gemini, Grok) return errors.
Temporary workaround: turn off the OpenAI API key toggle when you need subscription models (Claude/Gemini/Grok), and turn it on only for OpenAI models.
Actually after last updates custom OpenAI API key breaks even some of OpenAI models, i.e GPT-5 Codex works, but GPT-5 Highdoes not, it errors out with:
{"type":"error","sequence_number":1,"error":{"type":"invalid_request_error","code":"invalid_parameter","message":"prompt_cache_retention is not supported on this model","param":"prompt_cache_retention"}}
Of course this is not priority issue, because this feature is pretty niche and does not make money for Cursor (kind of the opposite), but this piece of functionality always had some issues (both breaking or not so much)