I’m using BYOK (Bring Your Own Key) with OpenAI, where my API Base URL points to my own proxy endpoint (not the official OpenAI URL).
Most of the time it works fine, but intermittently it stops working. Specifically, when I switch to my custom model (GPT-5.5), I occasionally get errors saying:
API unavailable
API limit reached / rate limit triggered
The issue is fairly frequent, not a one-off. Once it happens, the current chat session stays broken — I have to open a brand new chat session for it to work again.
Steps to Reproduce
Configure BYOK with OpenAI provider.
Set a custom API Base URL (my own proxy ip address).
Add/select a custom model (GPT-5.5).
Use the editor normally, then switch models mid-session.
Observe the intermittent API unavailable / rate limit error.
Expected Behavior
Switching models within an existing session should continue working without spurious rate-limit / unavailable errors.
he error appears intermittently after switching models, and the only workaround is to start a new chat session.
The rate-limit error may be coming from Cursor’s request handling rather than my proxy — when I open a new session it works immediately with no actual quota change on my proxy side, which suggests stale session/connection state after a model switch.
Hey, thanks for the detailed report. This isn’t actually a proxy bug or a stale session. It’s how things work on the Free plan right now.
BYOK with Agent and Edit requires a paid subscription (Pro/Teams). On Free, those requests are blocked server-side, but the client shows it as “rate limit reached / API unavailable”, which is why it’s confusing. That’s also why starting a new chat seems to “help” for a bit, and no real quota is being spent on your proxy. More details in this confirmed thread: BYOK Got Blocked in 0 limit left
Second thing, your custom model is named exactly gpt-5.5. That collides with a built-in model. Routing is based on the key plus Override Base URL, not the model name, which can cause intermittent behavior when switching. Give your model a unique name that doesn’t match built-ins like gpt-5.5, gpt, gpt-latest. Similar cases: Add custom model fail,No models available and Add Custom Model
Also, in your screenshot I see “Invalid API key / Unauthorized User Openai API key”. That’s a separate signal that your key or proxy is returning unauthorized. It’s worth checking that the key is valid and the proxy is accepting requests correctly.
So, to use BYOK with Agent reliably, you’ll need a paid plan plus a unique model name. After upgrading, in the Usage dashboard the Type field should show “User API Key”, which confirms requests are really going through your proxy.
I’m not on Free — I’m a Pro subscriber ($20/month). So the “BYOK requires a paid plan” explanation shouldn’t apply to me. BYOK with Agent/Edit should be fully available on my account.
I did NOT create a custom-named model. I’m not using a self-defined model. I enabled OpenAI BYOK, and I’m using the built-in GPT-5.5. My understanding is that with BYOK enabled, the built-in GPT-5.5 should automatically route through my own key + Override Base URL (my proxy), right? So there’s no model-name collision on my side, because I never added a custom model.
My actual suspicion: the server intermittently ignores my custom API Base URL and falls back to the official OpenAI endpoint. This would explain the Invalid API key / Unauthorized error — my key is valid against my proxy, but it would obviously be rejected if the request is sent to the official OpenAI URL instead of my Override Base URL.
A strong supporting signal: when the error happens, switching the GPT model or changing the reasoning effort within the same broken session sometimes makes it work again. That points to routing/connection state, not an actually invalid key or a real rate limit.
My request: Since this is intermittent and hard to reproduce on demand, could you look up the actual request details for one of these failed requests on the server side and tell me:
Which Base URL did the request actually go to — my Override Base URL (proxy) or the official OpenAI endpoint?
Was the error returned by my proxy, or by Cursor’s server before reaching my proxy?
That would let us confirm whether this is a routing/fallback bug rather than a key issue. Happy to provide my request ID / timestamp if you tell me where to find it.
Thanks for the correction, these details matter. Let’s go point by point.
Subscription status. On our side, the account linked to this report shows as Free cancelled, not Pro. That directly affects behavior since BYOK for Agent and Edit requires an active paid plan. Since checking a subscription status mismatch isn’t really a forum topic, please email [email protected] and the team will verify your account status. Until your status is confirmed as active Pro, some of the symptoms could be explained by the free tier gate, which the client can show as rate limit or API unavailable.
Built-in GPT-5.5 plus BYOK. Got it, you didn’t create a custom model, so the name collision idea doesn’t apply. I’ll drop that.
Your suspicion about falling back to the official endpoint. That’s reasonable. GPT-5.5 has known behavior where even with BYOK set up, the request may not go to your Override Base URL and instead gets served through Cursor infrastructure or sent to the official endpoint. That would explain Invalid API key or Unauthorized since your key is valid for your proxy but gets rejected if the request goes somewhere else. We’re aware of this issue and tracking it, but I can’t share an ETA right now. Related threads: Requests are sent to incorrect endpoint when using base URL override and GPT-5.5 BYOK not working
To tie your specific case to this, please send a Request ID from one of the failed requests plus an approximate timestamp. You can find it via the chat menu top right corner > Copy Request ID. Note that if Privacy Mode is enabled, the Request ID may be unavailable or limited. With that, we can check where the request actually went.
Let me know your subscription status and share the Request ID, and we’ll continue from there.