ENOTFOUND errors using Chat

Hello! I have searched all the forums for issues related to this and found some similar posts but nothing that looks like the exact issue I am having. I am using Cursor v.0.47.8 on Windows 10. I am on a Company VPN (needed in order to access Azure Open AI resource)

We use Azure Open AI to host our GPT models and have Kong gateway in front of Azure. Our base URL is, eg: service-int.mycompany.com/is/shared/azure/

I am able to add our custom deployment/Base URL in the “Azure API Key” section of cursor, and when I do so I see successful calls from the Network tab to the “/completions” endpoint.

Specifically, when I flip the switch to enable Azure API I see the request

{
  "messages": [
    {
      "role": "system",
      "content": "You are a helpful assistant."
    },
    {
      "role": "user",
      "content": "Test prompt using gpt-3.5-turbo"
    }
  ],
  "temperature": 1,
  "top_p": 1,
  "n": 1,
  "max_tokens": 10,
  "stream": false
}

and the server response appropriately.

When I switch to the Chat tab and attempt to send a basic prompt I get this error:

We encountered an issue when using your service-int.mycompany.com API key: Provider was unable to process your request
API Error:
getaddrinfo ENOTFOUND service-int.mycompany.com

I do NOT see any outbound network requests from the Network tab but I do see these error messages in the Console:

workbench.desktop.main.js:966 [composer] ToolFormer: error in toolWrappedStream undefined
workbench.desktop.main.js:598 ConnectError: [invalid_argument] Error
    at BBs.$endAiConnectTransportReportError (workbench.desktop.main.js:2319:113322)
    at yPi.S (workbench.desktop.main.js:4951:42954)
    at yPi.Q (workbench.desktop.main.js:4951:42732)
    at yPi.M (workbench.desktop.main.js:4951:41820)
    at yPi.L (workbench.desktop.main.js:4951:40921)
    at zae.value (workbench.desktop.main.js:4951:39713)
    at $.B (workbench.desktop.main.js:49:748)
    at $.fire (workbench.desktop.main.js:49:967)
    at qie.fire (workbench.desktop.main.js:2301:10362)
    at l.onmessage (workbench.desktop.main.js:4996:12119)
workbench.desktop.main.js:1922 [composer] Error in AI response: ConnectError: [invalid_argument] Error
    at BBs.$endAiConnectTransportReportError (workbench.desktop.main.js:2319:113322)
    at yPi.S (workbench.desktop.main.js:4951:42954)
    at yPi.Q (workbench.desktop.main.js:4951:42732)
    at yPi.M (workbench.desktop.main.js:4951:41820)
    at yPi.L (workbench.desktop.main.js:4951:40921)
    at zae.value (workbench.desktop.main.js:4951:39713)
    at $.B (workbench.desktop.main.js:49:748)
    at $.fire (workbench.desktop.main.js:49:967)
    at qie.fire (workbench.desktop.main.js:2301:10362)
    at l.onmessage (workbench.desktop.main.js:4996:12119)
workbench.desktop.main.js:1922 [composer] Failed to get complete AI response
workbench.desktop.main.js:955 Error checking file existence: Error: Unable to resolve filesystem provider with relative file path 'cursor.aisettings:cursor/aisettings'
workbench.desktop.main.js:955 Error checking file existence: Error: Unable to resolve filesystem provider with relative file path 'cursor.aisettings:cursor/aisettings'
workbench.desktop.main.js:955 Error checking file existence: Error: Unable to resolve filesystem provider with relative file path 'cursor.aisettings:cursor/aisettings'

From my laptop I am able to do an nslookup on the address I am trying to reach and it resolves succesfully. Additionally, it’s clear that the server is reachable since I’m able to enable the Azure API section and get a successful response to the “test prompt”.

I am unsure what the differences would be between the Test prompt and the chat (One might be using HTTP/2?) but it’s not clear to me how/why DNS resolution would be any different in either of those cases. Again, I don’t see any attempts to connect to the server in the Network tab (additionally I configured Cursor proxy to connect to a web debugging proxy and confirmed no network requests are made).

The error really seems to be a DNS resolution problem but I am not sure what other logs to check to see what might be going on.

Thanks for any help or guidance you can provide.

Just an update for others facing similar issue and perhaps for Cursor folks if they ever read this thread.

Based on our investigation it seems that when you use the Chat functionality in Cursor, the calls to your LLM provider are actually proxied through Cursor’s servers. In our case our private/internal Kong gateway is not accessible from the internet which explains why the hostname is unable to be resolved.

We saw further evidence of this when we cut Kong out of the picture and tried to go directly to our Azure Open AI deployments, which are set to be private, and got the following error:

Request failed with status code 403: {"error":{"code":"403","message": "Public access is disabled. Please configure private endpoint."}}

This was unexpected because we have strict requirements around privacy and data security and it was a surprise to us that all the requests go through Cursor’s servers.

I cannot confirm this 100% so it would be nice if someone who is knowledgeable about Cursor’s overall architecture could confirm.

Yes that is clear from cursors Docu. It is as you describe. Have a look at docu please.

Your original request was also clear from the error message

ENOTFOUND service-int.mycompany.com

that means that the server can not be accessed.

Could you share a link to the documentation where that is called out? I did plenty of googling when researching the original issue but I probably missed something.

The docu has an AI agent inside :slight_smile:

Sorry but if you bothered to look at the docu there is a clear relevent page listed there in main menu, you wouldnt need to ask

Also

Thanks for the links & appreciate the response.

1 Like