We have a custom model hosted on-prem. We expose it via OpenAI compatible API.
But when we use the hostname we get a DNS error and private IPs are forbidden when we try to override base URL in OpenAI configuration.
The model is an agentic model that was slightly fined tuned with private data, and we don’t want to expose it outside.
The issue is that BYOK API keys work through Cursor’s backend. All requests go through our servers for the final prompt construction. This means private IPs and internal hostnames aren’t accessible, because our backend can’t reach your internal network.
Can you send:
The exact DNS error text
The hostname you’re using (is it your company’s internal domain?)
The error message when trying to use a private IP
Your Cursor version (Menu → About Cursor → Copy)
Possible workarounds:
Expose the model via a public endpoint with authentication
After Cursor update, I get just a general error message We’re having trouble connecting to the model provider. This might be temporary - please try again in a moment.
The hostname is internal - prefer not to publish.
If I replace the hostname with IP I get {“error”:{“type”:“client”,“reason”:“ssrf_blocked”,“message”:“connection to private IP is blocked”,“retryable”:false}}
For the workarounds:
How can we authenticate the user that uses Cursor in our service?
If you have documentation that explains Cursor’s authentication mechanism, please share
On authentication for a public endpoint: Cursor sends the API key in the headers in the standard way (Authorization: Bearer). Your reverse proxy can validate that key or add extra authentication on your side.
But since you’re Enterprise, the best path is to reach out to [email protected]. The technical solutions engineers there can discuss integration options for your use case, including possible enterprise-specific options.