Grok, Composer are unreachable when overriding OpenAI URL

Describe the Bug

I override OpenAI Base URL and use API key of a different provider to use their model…
Now I can’t use Grok and Composer models. Why OpenAI settings prevent me from using Grok Code and Composer?

Request ID: 948045b8-ad3c-493d-a1fc-9f2e4a1cb559
{“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: {"error":{"code":"1211","message":"Unknown Model, please check the model code."}}\n”,“additionalInfo”:{},“buttons”:,“planChoices”:},“isExpected”:true}
ConnectError: [invalid_argument] Error

Request ID: c8c6f172-f424-4cbe-9ef7-de4ea57767ae
{“error”:“ERROR_BAD_USER_API_KEY”,“details”:{“title”:“Bad User API key”,“detail”:“Unauthorized User API key”,“isRetryable”:false,“additionalInfo”:{},“buttons”:,“planChoices”:},“isExpected”:true}
ConnectError: [unauthenticated] Error

Steps to Reproduce

Override OpenAI Base URL, use API key

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.0.69 (user setup)
VSCode Version: 1.99.3
Commit: 63fcac100bd5d5749f2a98aa47d65f6eca61db30
Date: 2025-11-07T18:21:29.650Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.26100

For AI issues: which model did you use?

Composer, Grok Code

For AI issues: add Request ID with privacy disabled

948045b8-ad3c-493d-a1fc-9f2e4a1cb559
c8c6f172-f424-4cbe-9ef7-de4ea57767ae

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey, thanks for the report. This is a known bug and it’s already being tracked.

When you override the OpenAI base URL or use a custom API key, it’s incorrectly applied to all models (including subscription models like Grok and Composer), which causes the errors you’re seeing.

Workaround: toggle off your custom OpenAI API key/URL when using Grok, Composer, Claude, or Gemini. You can quickly switch it with Cmd+Shift+0 (or Ctrl+Shift+0 on Windows).

Related discussion with more details: Custom API key breaks other models

Let me know if the workaround helps!

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