OpenAI API key keeps toggling off on its own

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

I am having an issue where the OpenAI API key toggles off on its own. I use API keys for work and my Cursor credits for personal stuff. I toggle on the OpenAI key, and within a day it has automatically toggled back off.

If I don’t manually check it every day, I’ll start eating up my personal credits without realizing it, because there’s nothing else in the UI that indicates if you’re using an API key or not. The Anthropic API key works fine and doesn’t do this.

There are other older forum posts for this bug, but they’re locked so I can’t reply.

Steps to Reproduce

  1. Add an OpenAI API key in Cursor settings and toggle it on.
  2. After a day or so, look in that area of Settings again and see that it has become turned off.

Expected Behavior

The API key stays toggled on until the user turns it off manually.

Operating System

MacOS

Version Information

Version: 2.5.26
VSCode Version: 1.105.1
Commit: 7d96c2a03bb088ad367615e9da1a3fe20fbbc6a0
Date: 2026-02-26T04:57:56.825Z
Build Type: Stable
Release Track: Default
Electron: 39.4.0
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Darwin arm64 25.3.0

For AI issues: which model did you use?

GPT 5.2

Additional Information

I also use an Anthropic API key and it does not have this issue.

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey, this is a known issue. The OpenAI API key toggle resets itself, while Anthropic stays stable. A few users have run into the same thing:

The team is aware. For now, sadly there isn’t a reliable workaround, other than manually checking the toggle like you’re already doing.

Just in case, try this:

  1. Remove the OpenAI API key completely
  2. Fully quit Cursor CMD+Q
  3. Restart and add the key again

No guarantee it’ll help, but sometimes it clears a bad cache state. Let me know if anything changes.

Hey everyone!

I’ve seen a few threads about this issue, but they were closed without a solution. Since it kept happening to me too, I decided to write a small extension to fix it myself. It basically forces the OpenAI key setting to stay “ON”.

Feel free to use it as a temporary fix:

Kind of amazing a bug as serious as this hasn’t been fixed for well over a year.

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

I use “Override OpenAI Base URL” to use either Vertex or OpenRouter.
It works. however during agent execution/plan/agent mode the “OpenAI API Key” toggle gets automatically disabled without any notification and Cursor starts incurring costs and usage against my usage limits. Obviously the expectation is to honor the configuration and use the BYOK that was explicitly enabled and setup.
No notifications or warning are displayed.
This is a breach of trust!

Not only you make it hard to integrate with external BYOK providers like OpenRouter and Vertex but i feel completely sabotaged with these silent breaches of configurations that never notify users of the configuration changes. You just get slapped with the bill.

Steps to Reproduce

Setup OpenRouter or Vertex via the only possible way in the app “Override OpenAI Base URL” and get the agent to build a plan and execute. eventually the enabled “OpenAI API Key” toggle will flip to disabled without any notification and cost will start incurring.

Expected Behavior

Don’t breach user’s trust by disabling an explicitly configured toggle. At least throw an error. This is so low I cannot believe it’s a bug. It feels like a feature.

Operating System

MacOS

Version Information

Version: 3.2.11
VSCode Version: 1.105.1
Commit: e9ee1339915a927dfb2df4a836dd9c8337e17cc0
Date: 2026-04-24T14:36:47.933Z
Layout: editor
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Darwin arm64 25.4.0

For AI issues: which model did you use?

Gemini 3.1 Pro

For AI issues: add Request ID with privacy disabled

Silent disable. no errors are thrown.

Additional Information

Automatically changing the user configurations shouldn’t exist as a feature.

Does this stop you from using Cursor

Yes - Cursor is unusable