API usage error

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

I want to continue using the cursor with the API I got from Google, but it keeps cutting off during long processes. I don’t know why I’m experiencing this issue.

Steps to Reproduce

Editor mode

Expected Behavior

When I add the Gemini API and continue using the cursor, it flows smoothly as it does in normal use.

Screenshots / Screen Recordings

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.2.44
VSCode Version: 1.105.1
Commit: 20adc1003928b0f1b99305dbaf845656ff81f5d0
Date: 2025-12-24T21:41:47.598Z (1 wk ago)
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 24.6.0

For AI issues: which model did you use?

Google Gemini

For AI issues: add Request ID with privacy disabled

Request ID: 4b6ac8b3-73c1-48fe-90bc-711eadee2eca
{“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

No - Cursor works, but with this issue

1 Like

Hey, thanks for the report.

This is a known issue, and the team is working on a fix. Many users using their own Gemini API keys are getting 429 “Resource exhausted” errors, even when their quota isn’t used up.

It’s related to how Cursor routes requests to the Gemini API. It uses a regional endpoint instead of the global one, which can trigger rate limiting on Google’s side.

You can follow the discussion here: Gemini API key doesn't work with the latest Cursor version

Sadly, there isn’t a reliable workaround yet. The team is working on a code-level fix.

2 Likes

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.