If you’ve tried using some custom AI provider in Cursor you’ve probably seen this:
- Cursor restricts localhost (127.0.0.1), making it difficult to use local proxies or self-hosted
- models. Cursor overrides model names (e.g., claude-*, gpt-*, or others) and forces them through its own integrations, ignoring your custom API settings. This means:
Models that work fine on your provider fail in Cursor with errors like “Model not found” or “Not authorized”.
Even if you configure everything correctly, Cursor prioritizes its own settings.
Note: This only works with Cursor Pro or higher (custom providers aren’t available on the free plan).
I built cursor-custom-provider to solve these issues:
-
Solves Localhost Restrictions: Allows a secure public HTTPS connection (via ngrok, Cloudflare, or Pinggy) so Cursor can reach your proxy.
-
Model Name Translation: Add a custom prefix (e.g., `custom-claude-sonnet-4.6`) in Cursor to work seamlessly with its validation. The proxy strips the prefix and forwards the correct name to your provider.
-
Zero dependencies: Just Python + your provider’s API key.
-
Works with any provider: Whether it’s cloud-based, local, or custom.
Example:
- In Cursor: Select `custom-claude-sonnet-4.6` (instead of Claude Sonnet 4.6).
- The proxy translates it to `claude-sonnet` and sends it to your provider.
Try it:
-
Download the repository (Download Here
-
Run it with your provider’s API key and ngrok token.
-
Configure Cursor to use your proxy URL with a prefix (e.g., `custom-claude-sonnet-4.6`).
This isn’t about a specific provider—it’s about making Cursor respect your API settings. Let me know if you’ve run into the same issues! Hope this can help anyone who has found the same problem as me!