Open AI API Base URL not working

I added my API key and set the base URL. (I double-checked — both are correct.)
The chat appeared in the history (and title was setted),
but the AI didn’t respond.

Hey, thanks for the report.

This looks like a known issue with Override OpenAI Base URL. Could you check a couple of things?

  1. Open Developer Tools (Help > Toggle Developer Tools) > the Console tab. Do you see any errors when you try to send a message?

  2. Please share:

    • Your Cursor version (Help > About Cursor > Copy)
    • A screenshot of your Models settings
    • Which provider you’re using (OpenRouter, LiteLLM, or something else)

This will help us narrow down the cause.

I see a lot of errors here
like :
workbench.desktop.main.js:13074 [composer] Error in AI response ConnectError: [resource_exhausted] Error
at szc.$endAiConnectTransportReportError (workbench.desktop.main.js:12375:456006)
at xBo._doInvokeHandler (workbench.desktop.main.js:13027:22831)
at xBo._invokeHandler (workbench.desktop.main.js:13027:22573)
at xBo._receiveRequest (workbench.desktop.main.js:13027:21335)
at xBo._receiveOneMessage (workbench.desktop.main.js:13027:20152)
at zLt.value (workbench.desktop.main.js:13027:18244)
at Ee._deliver (workbench.desktop.main.js:49:2962)
at Ee.fire (workbench.desktop.main.js:49:3283)
at Tvt.fire (workbench.desktop.main.js:12360:12156)
at MessagePort. (workbench.desktop.main.js:15027:18433

cursor model :
Version: 2.2.43 (system setup)
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: Windows_NT x64 10.0.19045

I use a provider called AvalAI.

Thanks for the detailed report and logs.

I can see a [resource_exhausted] error in the console. This is a known issue with “Override OpenAI Base URL”. When this setting is enabled, it can affect routing for all models, including Cursor’s built-in models.

Possible causes:

  1. The AvalAI endpoint might be incompatible with Cursor’s current implementation
  2. Cursor may be sending requests to /v1/responses instead of /v1/chat/completions
  3. Rate limits or other limits on the AvalAI side

Please try:

  1. Turn off “Override OpenAI Base URL” and check whether the default Cursor models work
  2. In Developer Tools (Help > Toggle Developer Tools) > Console, find the full error text. There may be more details after [resource_exhausted]

Can you share:

  • The full error text from the Console
  • Whether your AvalAI key works directly with the OpenAI API outside Cursor
  • Which model you selected in the Models list

The team is working on improving support for custom Base URLs.

It works when I turn off the base URL (on free models).
These are all the console errors:

workbench.desktop.main.js:13074 [transport] Stream error reported from extension host
ConnectError: [resource_exhausted] Error
at szc.$endAiConnectTransportReportError (workbench.desktop.main.js:12375:456006)
at xBo._doInvokeHandler (workbench.desktop.main.js:13027:22831)
at xBo._invokeHandler (workbench.desktop.main.js:13027:22573)
at xBo._receiveRequest (workbench.desktop.main.js:13027:21335)
at xBo._receiveOneMessage (workbench.desktop.main.js:13027:20152)
at zLt.value (workbench.desktop.main.js:13027:18244)
at Ee._deliver (workbench.desktop.main.js:49:2962)
at Ee.fire (workbench.desktop.main.js:49:3283)
at Tvt.fire (workbench.desktop.main.js:12360:12156)
at MessagePort. (workbench.desktop.main.js:15027:18433)

workbench.desktop.main.js:8903 [composer] ToolFormer: error in toolWrappedStream
undefined ConnectError: [resource_exhausted] Error

workbench.desktop.main.js:13075 [AiService] streamResponse
ConnectError: [resource_exhausted] Error

workbench.desktop.main.js:9994 [composer] Error in AI response:
{
  "error": "ERROR_RATE_LIMITED_CHANGEABLE",
  "details": {
    "title": "Cursor Subscription Required",
    "detail": "Agent and Edit rely on custom models that require a paid subscription. Please upgrade to a paid subscription or disable API keys.",
    "isRetryable": false
  },
  "isExpected": true
}

And finally:

workbench.desktop.main.js:13074 [composer] Chat incomplete or aborted

My AvalAI API key works outside of Cursor.
I selected GPT-5.2.

I think the problem might be AvalAI’s endpoint—it may not be compatible with Cursor’s implementation.

I tested this API key with other extensions and it worked, but it does not work with Cursor.

same problem here.

aval ai docs:

as you can see they do support responses too: