Describe the Bug
Hello, the following issue has already been reported:
https://forum.cursor.com/t/cannot-enable-openai-api-key/123006/3
I was also encountering it while trying to add my OpenRouter key
Steps to Reproduce
Attempt to add OpenAI API key, add OpenRouter instead with the correct URL, click ‘Verify’ to no avail
Expected Behavior
An error message, or better yet, a pass
Operating System
MacOS
Current Cursor Version (Menu → About Cursor → Copy)
Version: 1.3.5
VSCode Version: 1.99.3
Commit: 9f33c2e793460d00cf95c06d957e1d1b8135fad0
Date: 2025-07-30T00:25:05.701Z
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
Additional Information
It appears that there are two issues:
- There is no error message pop-up to indicate that something went wrong (unlike the Gemini one, for example)
- The verification attempts to hit
4o
, which may or may not be available to the user to test (the Bedrock one has a good open input for verification)
The offending request is:
{
"model": "gpt-4o",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Test prompt using gpt-3.5-turbo"
}
],
"temperature": 1,
"max_tokens": 10,
"stream": false
}
FWIW, I was able to get it all working and while the issue gets fixed, you can just paste this swizzle in you console to override all fetch requests and bypass the check:
Temporary Fix:
(function() {
const originalFetch = window.fetch;
window.fetch = async function(url, options) {
const response = await originalFetch(url, options);
return new Response(response.body, {
status: 200,
statusText: 'OK',
headers: response.headers
});
};
})();
then try to verify again
Does this stop you from using Cursor
Sometimes - I can sometimes use Cursor