The openai custom api toggle does not toggle

Describe the Bug

I am unable to use custom models because the openai toggle does not switch on when I toggle it. it says “are you sure you want to enable…”, I click “Enable…”, it thinks for a split second, and then nothing happens. Clicking the “verify” button also shows this meessage and then does nothing; not even an error message or anything.

Also, toggling off/on the override option resets the base url to an older setting, so any changes I make to the url now aren’t being saved.

the other api toggles work as expected.

similar posts:

Steps to Reproduce

just click the toggle or verify buttons under openai.

Expected Behavior

When I click the toggle, it should switch on/off states.
when I click verify, it should toggle on and then run a curl command to test api.

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

version: 1.1.6
commit: 5b19bac7a947f54e4caa3eb7e4c5fbf832389850

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

1 Like

Hey, yeah, we’ve noticed this bug before. Have you tried restarting Cursor? I guess this happens after you switch from one API key to another?

I tried resarting it just now, but the problem persists.

2 Likes

I have encountered a similar issue. To understand what the error is, you need to click Help → Developer Tools, and usually, the error will be visible in the console. Alternatively, you can check the Network tab. Typically, this is due to an incorrect key, an incorrect API host, or CORS not being configured properly.

I’m running into this issue as well. Steps I’ve taken:

  • I’ve updated to the latest version of Cursor (Version: 1.1.6).
  • I’m using the same API key that worked previously.
  • I’ve hit the “Verify” button a few times and there’s no obvious error or confirmation. (A side request: Can we make the verify confirm in a more explicit way? It’s quite ambiguous when it finishes verifying.)
  • I’ve restarted and the issue still persists

Attempting to enable the openAI key will trigger the Verify API key flow and then fail. The toggle state stays in disabled.

This is still an issue for me and it’s costing me extra money.

Below is my cursor version. I thought upgrading to the latest version would help, but that doesn’t appear to have helped at all.

Version: 1.2.2
VSCode Version: 1.99.3
Commit: faa03b17cce93e8a80b7d62d57f5eda6bb6ab9f0
Date: 2025-07-07T06:08:52.104Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin arm64 23.0.0

I’m using MacOS Sonoma 14.0

I’ve restarted Cursor a few times. I cannot get my original openAI key to verify, which was working previously. I tried verifying with a made up API, and as expected, that didn’t verify. Side note, I would still like like a more useful verification feedback instead of it doing nothing on pass or fail. I created another API key on openAI and that new API key does not verify.

I am able to get Anthropic and Google’s API keys to verify fine and enable their models with no problem.

Can I get some help with this? When I look at the openAI billing dashboard, it appears to be more costly to go through Cursor than directly through my API key.

Ah-hah! I found another post with how to fix this. You have to enable chatGPT’s gpt-4o model, because that’s the model that’s used for verification.

https://forum.cursor.com/t/custom-models-cant-enable-openai-api-key/100916/4?u=concord.lacunae

Separately, perhaps it makes sense to auto-enable the model used for verification when people try to verify their openAI key instead of having things silently fail.

2 Likes

I’ve tried this, but it didn’t help. Even in latest version, this issue prevents me from using my own API keys for anything.

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.4.0

3 Likes

It’s not working here either, don’t use Openheim API keys, but I use Open keys.

Version 1.4.2 the problem is still there

While we are working on an update that improves this, note:

  • Disable all models that are not available in your custom API
  • If a model available on your API key account is not listed you can add it manually in Cursor Settings > Models.

This should make it possible to verify your own API URL & key.
(it has been confirmed by a user in their own thread)

“This should make it possible to verify your own API URL & key.
I can confirm that this does not work on my end. No set of on/off models fixes this issue.
Also, there’s no reason it should be all or nothing; We should be able to use groq, claude, and OpenAI models, not just one at a time.

”it has been confirmed by a user in their own thread”
it would be nice to include a link to the thread.

hi @Tor-Saxberg the OpenAI compatible URL may not contain /chat/completions it must be the main API URL as /chat/completions is added by the system automatically.

Could you check Developer tools - Network for issues when you run the verification?

Help > Toggle Developer Tools > Network tab

You may see with your current configuration: /chat/completions/chat/completions with error. Therefore remove /chat/completions from your API path.

I’m having the same problem as @Tor-Saxberg, but I’m using OpenAI’s base URL.
When i click on developer mode and click verify, console show:
”workbench.desktop.main.js:786

   POST https://api.openai.com/v1/chat/completions 429 (Too Many Requests)

I set “Override OpenAI Base URL” to

https://api.openai.com/v1

Network tab shows what appears to be normal path (no repetitions).

What other steps should I take?

I know managed to get to work.
Further inspection of the network tab showed cursor was not using my provided API key as the bearer token. Was using something else.

Still need to test if it works (have yet to verify organization)

1 Like

Alright, after the most recent update I got this working with cerebras, and with only 4o checked it works with openai as well.

However, it looks like I have to toggle the api key on/off to switch between qwen-coder and gpt-5, and I’d have to paste in a new base url and api key each time to switch between 2+ custom models; I can’t just select it from the chat menu. Is there a solution to this, or is this not a cursor feature?

We do not have currently a simpler integration, but I will pass the feedback to team.

Describe the Bug

under > API keys > OPENai api key >.. is a toggle, normally toggles work, in this case to mod my API key to openrouter to escape the limitations here. the toggle itself is not functioning.

Troubleshooting completed: enabled all OpenAI models > restarted > nothing! - Stuffed the API key in there > hit Verify > nothing… restarted.. nothing.

Other than wasting our time, why is this happening? The level of ‘R’ is mindblowing.

Steps to Reproduce

try and toggle the button…

Expected Behavior

the button should toggle, thus the ‘toggle’ name of the button.

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.2.4 (user setup)
VSCode Version: 1.99.3
Commit: a8e95743c5268be73767c46944a71f4465d05c90
Date: 2025-07-10T17:09:01.383Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.26100

Additional Information

I feel like this issue is by design to thwart any progress outside of the openai cult.

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey, thanks for the report. Could you also check the DevTools panel for any errors?

I’m facing the same issue. I can enable all other api keys, except openai.