# "Problem reaching OpenAI" error on a local model with overriden base URL

**URL:** <https://forum.cursor.com/t/problem-reaching-openai-error-on-a-local-model-with-overriden-base-url/3975>\
**Category:** Help\
**Created:** [April 3, 2024, 5:38pm UTC](https://forum.cursor.com/t/problem-reaching-openai-error-on-a-local-model-with-overriden-base-url/3975 "2024-04-03T17:38:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vbl](https://avatars.discourse-cdn.com/v4/letter/v/8e8cbc/32.png) [@vbl](https://forum.cursor.com/u/vbl)\
**Post date:** [April 3, 2024, 5:38pm UTC](https://forum.cursor.com/t/problem-reaching-openai-error-on-a-local-model-with-overriden-base-url/3975/1 "2024-04-03T17:38:24Z")

</div>

I’m using a local model (on `localhost`) and I have overriden the base URL in the settings. The `Verify` API key button works well (and I can see that this request is sent to my model on localhost), so everything seems to work fine (and the OpenAI API Key button is activated and green).

But when I try to use the chat, I get an error message “Problem reaching OpenAI”.

Also, when I tried to inspect the request with Mitmproxy, it reveals that the request is sent to api2.cursor.sh, not to localhost.

---

<div class="post-metadata">

**Author:** ![rishabhy](https://avatars.discourse-cdn.com/v4/letter/r/848f3c/32.png) [@rishabhy](https://forum.cursor.com/u/rishabhy)\
**Post date:** [April 3, 2024, 5:55pm UTC](https://forum.cursor.com/t/problem-reaching-openai-error-on-a-local-model-with-overriden-base-url/3975/2 "2024-04-03T17:55:49Z")

</div>

The override base url must be publicly accessible as the request first goes to our backend servers for preprocessing

---

<div class="post-metadata">

**Author:** ![vbl](https://avatars.discourse-cdn.com/v4/letter/v/8e8cbc/32.png) [@vbl](https://forum.cursor.com/u/vbl)\
**Post date:** [April 4, 2024, 11:06am UTC](https://forum.cursor.com/t/problem-reaching-openai-error-on-a-local-model-with-overriden-base-url/3975/3 "2024-04-04T11:06:56Z")

</div>

Ok. Thanks.

I thinks that’s worth mentioning in the UI. I spent almost one hour trying to debug this.

---

<div class="post-metadata">

**Author:** ![chaws](https://avatars.discourse-cdn.com/v4/letter/c/cab0a1/32.png) [@chaws](https://forum.cursor.com/u/chaws)\
**Post date:** [April 11, 2024, 10:53pm UTC](https://forum.cursor.com/t/problem-reaching-openai-error-on-a-local-model-with-overriden-base-url/3975/4 "2024-04-11T22:53:35Z")

</div>

Does this mean there is no way to run against a local model without internet access? I was not aware that every request is routed through a cursor server. Seems like something that should be mentioned in the UI when configuring which models to use…

I have OpenAI disabled yet I am still getting the “Problem reaching OpenAI” error.

---

<div class="post-metadata">

**Author:** ![Nikhil](https://avatars.discourse-cdn.com/v4/letter/n/b782af/32.png) [@Nikhil](https://forum.cursor.com/u/Nikhil)\
**Post date:** [June 12, 2024, 9:47pm UTC](https://forum.cursor.com/t/problem-reaching-openai-error-on-a-local-model-with-overriden-base-url/3975/5 "2024-06-12T21:47:26Z")

</div>

Looks like so I was also trying to figure out how I can route cursor requests to local llm but there’s no option as of now. I hope they will support this in future.
