Gemini API key doesn't work with the latest Cursor version

Where does the bug appear (feature/product)?

Background Agent (GitHub, Slack, Web, Linear)

Describe the Bug

I am tier 3 at GCP. Currently trying to use gemini-3-pro-preview and I’m getting the error below in spite of using gemini-3-pro-preview outside cursor. Gemini-3-pro-preview works and my rate-limiting with GCP isn’t affecting the requests. We are processing close 100K requests per day with Gemini models and our plan and account allows for even more. Cursor however hits errors when using my private API key for Gemini models. This used to work last week. I’m on MacOS using:

Version: 2.2.36 (Universal)
VSCode Version: 1.105.1
Commit: 55c9bc11e99cedd1fb93fbb7996abf779c583150
Date: 2025-12-18T06:25:21.733Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin x64 25.2.0

Request ID: 04bfecf6-a059-44e4-8086-2748907129e2
{“error”:“ERROR_OPENAI”,“details”:{“title”:“Unable to reach the model provider”,“detail”:“We encountered an issue when using your API key: Streaming error\n\nAPI Error:\n\n\n{"error":{"type":"provider","reason":"provider_error","message":"Provider returned 429","retryable":true,"provider":{"status":429,"body":"[{\n \"error\": {\n \"code\": 429,\n \"message\": \"Resource has been exhausted (e.g. check quota).\",\n \"status\": \"RESOURCE_EXHAUSTED\"\n }\n}\n]"}}}\n”,“additionalInfo”:{},“buttons”:,“planChoices”:},“isExpected”:true}

Steps to Reproduce

I’m on a paid Pro plan with Cursor. I’m trying to use my Gemini API Key instead of using plan’s included requests.

Expected Behavior

I want to be able to work with Cursor using my Gemini/Vertext/Google AI Studio API key . This used to work until recently.

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.2.36 (Universal)
VSCode Version: 1.105.1
Commit: 55c9bc11e99cedd1fb93fbb7996abf779c583150
Date: 2025-12-18T06:25:21.733Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin x64 25.2.0

For AI issues: which model did you use?

Gemini-3-pro-preview in Agent mode

For AI issues: add Request ID with privacy disabled

Request ID: 04bfecf6-a059-44e4-8086-2748907129e2
{“error”:“ERROR_OPENAI”,“details”:{“title”:“Unable to reach the model provider”,“detail”:“We encountered an issue when using your API key: Streaming error\n\nAPI Error:\n\n\n{\"error\":{\"type\":\"provider\",\"reason\":\"provider_error\",\"message\":\"Provider returned 429\",\"retryable\":true,\"provider\":{\"status\":429,\"body\":\"[{\\n \\\"error\\\": {\\n \\\"code\\\": 429,\\n \\\"message\\\": \\\"Resource has been exhausted (e.g. check quota).\\\",\\n \\\"status\\\": \\\"RESOURCE_EXHAUSTED\\\"\\n }\\n}\\n]\"}}}\n”,“additionalInfo”:{},“buttons”:,“planChoices”:},“isExpected”:true}

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

6 Likes

Hey, thanks for the report. I can repro it. I’ll pass it to the team.

1 Like

I second this. In exactly same boat. Almost “unlimited” quota yet hit 429 on a single request. But those errored request don’t show in the logs. They do show up in the error count chart though.

I’ve done some research and apparently Cursor is using the same region for all clients instead of the global endpoint which is applying some dynamic quota related to RPS. If you hit the global endpoint you may avoid dqs. Or perhaps cursor can call Google to relax a bit. They told there’s nothing they can do for me.

3 Likes

I’m encountering the same issue with the Gemini API, but far more frequently. It happens every three or four requests, even though the quota is not exhausted when I check AI Studio or GCP. The API returns a 429 RESOURCE_EXHAUSTED error and reports that it is unable to reach the model provider.

{“error”:“ERROR_OPENAI”,“details”:{“title”:“Unable to reach the model provider”,“detail”:“We encountered an issue when using your API key: Streaming error\n\nAPI Error:\n\n\n{\"error\":{\"type\":\"provider\",\"reason\":\"provider_error\",\"message\":\"Provider returned 429\",\"retryable\":true,\"provider\":{\"status\":429,\"body\":\"[{\\n \\\"error\\\": {\\n \\\"code\\\": 429,\\n \\\"message\\\": \\\"Resource has been exhausted (e.g. check quota).\\\",\\n \\\"status\\\": \\\"RESOURCE_EXHAUSTED\\\"\\n }\\n}\\n]\"}}}\n”,“additionalInfo”:{},“buttons”:,“planChoices”:},“isExpected”:true}

Cursor’s idea of ‘global’ seems to be: one region for everyone. LOOL. Jokes aside, routing BYOK traffic to the global endpoint (or at least letting users choose the region) feels like the simplest fix. ‘There’s nothing we can do’ reads a lot like ‘we don’t want to’ especially when the workaround is basically an endpoint choice.

I am currently facing the exact same issue. So many bugs on cursor, I am contemplating moving to a different IDE if this isn’t fixed. I am also on a pro plan.

Hi, unfortunately I’ve also been experiencing the same issues for the last two days

Same here. This is so frustrating.

I had the same problem and the way I solved it was by changing the agent settings within the cursor settings, the Messages in queue option to “Stop and send immediately”. Now I’ve been using the Gemini API for hours without any problems.

2 Likes

I’ll check it out, but I’m curious how can this be the solution? @deanrie if the problem is indeed the wrong endpoint, sending messages with the delay vs immediately can’t solve the global quota problem, can it? I think there’s a high likelihood that you got lucky and endpoint hasn’t been bombarded with request when you did this. Nonetheless, getting my fingers crossed. Thanks for reporting.

I’m having the same issue, and I’ve confirmed that my API key still has plenty of quota left. Please fix this, it’s so annoying.

They know that if they fix this problem, they won’t make as much money as before. But if they continue like this, they’ve already lost to antigravity.

1 Like

It actually worked for a few hours that day, and then the error returned. False alarm :frowning:

No models work even with own api keys….

same issue here

not working

Same issue here, need this fixed ASAP or I will not be renewing!

@deanrie Hi, any update about this topic?

Hey, thanks for the reminder. The team has confirmed the issue and is working on it. The main cause is that a regional endpoint is being used instead of the global one for the Gemini API, which leads to problems with dynamic quotas.

Unfortunately, I can’t share an exact timeline for the fix right now, but it’s a priority.

I’ll keep an eye on this thread and share updates as soon as we have progress on a fix.

3 Likes