API Keys for ChatGPT and Anthropic Failing

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Whenever I try to use one of my confirmed working API keys that was applied in settings it fails and gives me errors similar to below. It appears the Cursor service is not letting the API request go through to the AI provider. Anyone else running into this? If I switch “Override OPenAI Base URL” to false it will work with one request, then if flips back on, and fails when on.

Steps to Reproduce

Add API key for service in Settings>Models. Turn it on. Then try to work with an agent in that model.

Expected Behavior

It is supposed to work.

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.1.34
VSCode Version: 1.105.1
Commit: 609c37304ae83141fd217c4ae638bf5321856500
Date: 2025-11-25T16:35:52.391Z
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.0.0

For AI issues: which model did you use?

Sonnet 4.5 and ChatGPT 5.1

For AI issues: add Request ID with privacy disabled

Anthropic API: "Request ID: f2a6083a-5b51-4f57-ad9f-3f62d709334d
{“error”:“ERROR_BAD_USER_API_KEY”,“details”:{“title”:“Bad User API key”,“detail”:“Unauthorized User API key”,“isRetryable”:false,“additionalInfo”:{},“buttons”:,“planChoices”:},“isExpected”:true}
"

ChatGPT API"Request ID: 046b8f29-f36e-48d6-9670-f3a57f37f27b
{“error”:“ERROR_OPENAI”,“details”:{“title”:“Unable to reach the model provider”,“detail”:“We encountered an issue when using your API key: Provider was unable to process your request\n\nAPI Error:\n\n\nRequest failed with status code 400: {\n \"error\": {\n \"message\": \"Missing required parameter: 'messages'.\",\n \"type\": \"invalid_request_error\",\n \"param\": \"messages\",\n \"code\": \"missing_required_parameter\"\n }\n}\n”,“additionalInfo”:{},“buttons”:,“planChoices”:},“isExpected”:true}
ConnectError: [invalid_argument] Error
at EZc.$endAiConnectTransportReportError (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:6331:408452)
at GPo._doInvokeHandler (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:6948:21873)
at GPo._invokeHandler (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:6948:21615)
at GPo._receiveRequest (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:6948:20377)
at GPo._receiveOneMessage (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:6948:19194)
at yPt.value (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:6948:17286)
at _e._deliver (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:49:2962)
at _e.fire (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:49:3283)
at Xmt.fire (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:6316:12156)
at MessagePort. (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:8973:18439)"

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report. You’re running into a known bug with the “Override OpenAI Base URL” toggle.

What’s happening: when “Override OpenAI Base URL” is enabled, Cursor sends malformed requests, which cause both errors you’re seeing:

  • OpenAI: “Missing required parameter: ‘messages’”
  • Anthropic: “Unauthorized User API key”

Important context: the Anthropic API also had an outage earlier today (resolved around 10:42 UTC): Claude Status - Elevated Error Rates on the API - this may also have contributed to your Anthropic errors.

Temporary workaround: turn off “Override OpenAI Base URL” in Settings > Models > API Keys. Unfortunately, there’s a bug where this toggle can turn itself back on, so you may need to disable it more than once until a fix is deployed.

I’m escalating this toggle bug to the engineering team. We’ll update this thread once there’s a proper fix.

Thank you. Yes, it was toggling back on after every request.

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