DEV Community

Orchid Files
Orchid Files

Posted on

Cursor Keeps Disabling the OpenAI Base URL Override

I set a custom OpenAI Base URL in Cursor. The setting routes chat requests through any OpenAI-compatible endpoint — a local proxy, Ollama, or a self-hosted model. It worked: requests went through my setup and the logs filled up. Then the next morning the proxy dashboard showed no requests since the evening before. Chat still worked. The "Override OpenAI Base URL" checkbox in Cursor Settings → Models → API Keys was off.

I had not touched it. Cursor had.

 

What is actually happening

When you enable a custom OpenAI Base URL, Cursor stores the option in its SQLite state database (state.vscdb) under the useOpenAIKey property. While the value is true, every request goes to your URL. Cursor flips it to false on its own, every few hours, and requests fall back to default API token billing.

Because chat keeps working after the switch, you only notice it when you check your endpoint logs or the token bill:

  1. Requests stop reaching your endpoint (a proxy, Ollama, or a self-hosted model).
  2. Requests consume API tokens instead of going through your setup.
  3. Cursor shows no error and no warning, so the reset stays invisible.

Re-checking the box fixes it for a few hours, then Cursor resets it. The setting and the bug have both been around for a long time, and I do not think Cursor will fix it: while the checkbox is off, every request goes through their token billing, and your endpoint sends them nothing.

 

Cursor has not fixed this for over a year

This is not a one-off glitch. The reset shows up repeatedly on the Cursor forum and the threads stay open without a fix. One November 2025 report (still unresolved in January 2026) says it has been like this for months with no fix. A March 2026 thread calls it a bug that hasn't been fixed for well over a year, and an April 2026 report in the same thread describes the same unannounced disable with costs incurring and no notification. The pattern is consistent across macOS, Linux, and Windows: the toggle resets on its own, with no error and no warning.

 

Keeping the setting enabled

Manual re-checks only buy a few hours. The fix is to watch the setting and restore it the moment Cursor turns it off. The open-source Ungate extension does exactly that: it monitors state.vscdb and re-enables the option whenever Cursor disables it. Ungate also connects Claude and ChatGPT subscriptions to Cursor — the full walkthrough is in the guide to using subscriptions in Cursor.

Extension startup
   ↓
read useOpenAIKey value
   ↓
state.vscdb change detected
   ↓
verify useOpenAIKey
   ↓
false → set useOpenAIKey to true in state.vscdb
   ↓
"Override OpenAI Base URL" restored
Enter fullscreen mode Exit fullscreen mode

The watcher runs in the background across open Cursor windows. When useOpenAIKey flips to false, Ungate sets it back to true in state.vscdb and the checkbox is restored.

 

Related

If your Base URL points to localhost and requests hang instead of switching back, that is a different quirk, explained in this post about the localhost restriction.

GitHub repository: https://github.com/orchidfiles/ungate

My Blog: orchidfiles.com
Telegram Channel: @orchidfiles

Top comments (0)