Override Anthropic Base URL automatically switches on when using Anthropic BYOK

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

The Override OpenAI Base URL gets automatically enabled if the Anthropic API Key is enabled, and the Cursor IDE will attempt to use the Override OpenAI Base URL when using Claude models.

I flipped it off, and it worked for the very next request. But it’s switched on automatically. It is just so annoying as it’ll block the very next agent request after a tool call (e.g. read a file), which is essentially making the BYOK for Anthropic useless.

I tried putting in https://api.openai.com/v1, but it’ll still get switched on automatically, and the requests for Anthropic models will actually go to OpenAI, causing the following error:

Request ID: 0150792a-214f-4325-99d1-402313e11fa0
{"error":"ERROR_OPENAI","details":{"title":"Unable to reach the model provider","detail":"We encountered an issue when using your API key: Model claude-opus-4-5-20251101 is not a reasoning effort model\n\nAPI Error:\n\n```\nModel claude-opus-4-5-20251101 is not a reasoning effort model\n```","additionalInfo":{},"buttons":[],"planChoices":[]},"isExpected":true}
ConnectError: [invalid_argument] Error
    at _Gc.$endAiConnectTransportReportError (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:12155:455960)
    at lBo._doInvokeHandler (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:12807:22831)
    at lBo._invokeHandler (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:12807:22573)
    at lBo._receiveRequest (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:12807:21335)
    at lBo._receiveOneMessage (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:12807:20152)
    at $Lt.value (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:12807:18244)
    at Ee._deliver (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:49:2962)
    at Ee.fire (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:49:3283)
    at Cvt.fire (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:12140:12156)
    at MessagePort.<anonymous> (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:14806:18433)

I tried typing https://api.anthropic.com/v1, hoping it would call the Anthropic API using the Anthropic Schema, but it doesn’t work either. Here’s the error:

Request ID: 6684c75c-0926-41f2-ab3d-e019b1853a4c
{"error":"ERROR_OPENAI","details":{"title":"Unable to reach the model provider","detail":"We encountered an issue when using your API key: Streaming error\n\nAPI Error:\n\n```\n{\"error\":{\"type\":\"provider\",\"reason\":\"provider_error\",\"message\":\"Provider returned 400\",\"retryable\":false,\"provider\":{\"status\":400,\"body\":\"{\\\"error\\\":{\\\"code\\\":\\\"invalid_request_error\\\",\\\"message\\\":\\\"tool_choice.literal['auto','required','none']: Input should be 'auto', 'required' or 'none'\\\",\\\"type\\\":\\\"invalid_request_error\\\",\\\"param\\\":null}}\"}}}\n```","additionalInfo":{},"buttons":[],"planChoices":[]},"isExpected":true}

It was reported OpenAI Base URL override automatically switches on if a value is present , but it wasn’t for the Anthropic API Key, and the workaround doesn’t work for Anthropic BYOK.

Steps to Reproduce

  1. Put a valid API key in the Anthropic API Key field.
  2. Switch off the Override OpenAI Base URL field.
  3. Immediately create a new chat session, and ask a simple question like What's the difference between solidjs and react? using Opus 4.5.
  4. It’ll give you the answer, but a few seconds later, the Override OpenAI Base URL is automatically enabled.
  5. Once it’s enabled, it’s not possible to use Opus 4.5 again, and you’ll get the error corresponding to the value of Override OpenAI Base URL.

Expected Behavior

If it’s switched off, it stays off, and Anthropic API should not use that field since it’s clearly documented as “Change the base URL for OpenAI API requests.”

Anthropic API Key should have its own Override Anthropic Base URL, with a switch Use OpenAI Chat Completion or Response API. When the Use OpenAI Chat Completion or Response API is off, requests going to the Override Anthropic Base URL should follow the Anthropic API schema.

Screenshots / Screen Recordings

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.2.43
VSCode Version: 1.105.1
Commit: 32cfbe848b35d9eb320980195985450f244b3030
Date: 2025-12-19T06:06:44.644Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 24.6.0

For AI issues: which model did you use?

Opus 4.5

Additional Information

Please don’t say “Hey, you can always deploy a one-api-ish proxy to make it work”. It’s been there for months, and leaving broken features there doesn’t meet Cursor’s quality standards. Or, if it takes time to fix (not sure why it’s taking more than half of a day), please update the descriptions in those fields to avoid confusion.

Does this stop you from using Cursor

Yes - Cursor is unusable

1 Like

Hey, thanks for the report.

This is a known issue the team is working on. Before we escalate, let’s try the standard troubleshooting steps:

  1. Clear the Override OpenAI Base URL field completely (leave it empty).
  2. Turn off the Override OpenAI Base URL toggle.
  3. Fully quit Cursor CMD+Q.
  4. Relaunch Cursor.
  5. Check if the toggle stays off.

If the toggle still turns itself back on automatically, that confirms the known bug. A similar issue is discussed here: Override OpenAI Base URL toggle switch turn on automatically after few seconds no matter how many times I turn off

Let me know if these steps helped.

Hi,

I tried both:

  1. The Anthropic API Key field is disabled.
  2. I cleared the Override OpenAI Base URL field completely (just cmd + A and delete), the field trigger gets immediately switched off.
  3. I flipped the Anthropic API Key on.
  4. Immediately, I closed Cursor via cmd + Q.
  5. After starting Cursor again, the Override OpenAI Base URL field stays off and the Anthropic API Key field stays on, but I couldn’t use Opus 4.5 model. The error seems like the override field is still internally working:
Request ID: d3843754-64a2-4c16-84f2-3074d4eb8bbd
{"error":"ERROR_OPENAI","details":{"title":"Unable to reach the model provider","detail":"We encountered an issue when using your API key: Streaming error\n\nAPI Error:\n\n```\n{\"error\":{\"type\":\"provider\",\"reason\":\"provider_error\",\"message\":\"Provider returned 404\",\"retryable\":false,\"provider\":{\"status\":404,\"body\":\"{\\\"type\\\":\\\"error\\\",\\\"error\\\":{\\\"type\\\":\\\"not_found_error\\\",\\\"message\\\":\\\"model: claude-4.5-opus-high-thinking\\\"},\\\"request_id\\\":\\\"req_011CWQQ74VvFEokVKW9eu2st\\\"}\"}}}\n```","additionalInfo":{},"buttons":[],"planChoices":[]},"isExpected":true}

Then, I tried:

  1. The Anthropic API Key field is enabled with a proper API Key inside.
  2. I enabled the Override OpenAI Base URL field, and restarted Cursor.
  3. After restart, both field stays on.
  4. I cleared the Override OpenAI Base URL field completely (just cmd + A and delete), the field trigger gets immediately switched off.
  5. Immediately, I closed Cursor via cmd + Q.
  6. Before the window closes, I saw the Override OpenAI Base URL field gets flipped on while there’s a pop up window saying the window state is being saved.
  7. After starting Cursor again, the Override OpenAI Base URL field stays on.
  8. Everything behaves the same as I mentioned earlier - I need to flip it off to finish a single turn, and it gets flipped on automatically. If the Anthropic API Key field remains on, when closing Cursor, the Override OpenAI Base URL field gets turned on automatically before the window closes.

Damn I think I found the workaround - it’s so ugly and I am very keen to have this fixed soon.

  1. Make sure that you have only one empty window of the Cursor without any projects opened.
  2. Make sure that after a fresh start of Cursor, the Override field and Anthropic field are both turned on, and the URL in the Override field is the default openai v1 endpoint.
  3. Flip the Override field trigger off. Yes, you have to flip it off while the Anthropic field is enabled.
  4. Immediately close the Cursor via cmd + Q, because there are no open projects, the Cursor will be turned off immediately, leaving no time for the Override field to be flipped back on.
  5. Open the Cursor again, and the Anthropic BYOK will work as expected.

Thanks for the info. Yes, this is a known issue, and the team is working on it.

The bug is already in our development backlog. I can’t share an exact ETA yet, but it’s documented and has been prioritized by the team.

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.