Inconsistent token & rate limits when using my Google API key in Cursor

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Requests through Cursor are rejected with inconsistent token and rate-limit errors, while the same API key and identical requests succeed when called directly from my own application.

Steps to Reproduce

  1. Add my Google AI Studio API key in Cursor.

  2. Run Gemini 2.5 Pro or Gemini Flash 2.5 with a large request (≈500k+ tokens input or high output).

  3. Cursor returns errors like “User API Key Rate limit exceeded” or “The input token count (551328) exceeds the maximum number of tokens allowed (524288).”

  4. Run the exact same request with the same API key from my own application → request succeeds without errors.

Expected Behavior

Cursor should forward requests to Google without applying lower token/rate limits than those documented by Google. Large requests that succeed when sent directly should also succeed when sent from Cursor with the same key.

Screenshots / Screen Recordings

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.7.17 (Universal)
VSCode Version: 1.99.3
Commit: 34881053400013f38e2354f1479c88c9067039a0
Date: 2025-09-29T03:10:26.099Z
Electron: 34.5.8
Chromium: 132.0.6834.210
Node.js: 20.19.1
V8: 13.2.152.41-electron.0
OS: Darwin arm64 25.0.0

For AI issues: which model did you use?

Gemini 2.5 Pro

Gemini Flash 2.5

For AI issues: add Request ID with privacy disabled

81ffe413-8ab3-4fe7-91b4-9655d8ac4a92 - flash 2.5
64974958-c8a0-4fb8-8994-731c4f2e077f - 2.5 pro

Additional Information

Google Cloud project balance: ~$2,800, quotas OK.

Same key processed ~2,000,000 tokens directly via my own app without issues.

Tried 4 different API keys (different projects) → all succeed directly, all fail with limits in Cursor.

Errors show inconsistent caps (128k, 132k, 80k tokens) even though model is set to max.

Country supported by Google, billing active.

Issue is reproducible and blocks large-context use of Cursor.

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey, thanks for the report. We’ll investigate it.

1 Like

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