Gemini 2.5 Pro - Own API Key - Not Working

Describe the Bug

Gemini 2.5 pro Byok not working with max mode

this is is the error message-
We encountered an issue when using your API key: Provider was unable to process your request API Error: Request failed with status code 404: [{ "error": { "code": 404, "message": "models/gemini-2.5-pro-latest is not found for API version v1main, or is not supported for generateContent. Call ListModels to see the list of available models and their supported methods.", "status": "NOT_FOUND" } } ]
Request ID: 6efeb2ae-3b2a-4cf2-a430-4442ded2f77e

Steps to Reproduce

-BYOK gemini api in model
-Toggle max mode with gemini 2.5 pro

this is he

Expected Behavior

supposed to work as usual with max mode

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.2.4 (Universal)
VSCode Version: 1.99.3
Commit: a8e95743c5268be73767c46944a71f4465d05c90
Date: 2025-07-10T16:55:16.443Z (1 wk ago)
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.5.0

Does this stop you from using Cursor

No - Cursor works, but with this issue

2 Likes

Hey, to be clear, does this work with MAX enabled? This may be a bug, as with an API key enabled, all requests are treated as ‘MAX mode’!

Describe the Bug

Request ID: 7aef7d6b-2f32-47e1-b82a-62c6add36f87
{“error”:“ERROR_OPENAI”,“details”:{“title”:“Unable to reach the model provider”,“detail”:“We encountered an issue when using your API key: Provider was unable to process your request\n\nAPI Error:\n\n\nRequest failed with status code 404: [{\n \"error\": {\n \"code\": 404,\n \"message\": \"models/gemini-2.5-pro-latest is not found for API version v1main, or is not supported for generateContent. Call ListModels to see the list of available models and their supported methods.\",\n \"status\": \"NOT_FOUND\"\n }\n}\n]\n”,“additionalInfo”:{},“buttons”:},“isExpected”:true}
ConnectError: [invalid_argument] Error
at x9a.$endAiConnectTransportReportError (vscode-file://vscode-app/c:/Users/Bek/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:4757:223764)
at hir.S (vscode-file://vscode-app/c:/Users/Bek/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:492:17741)
at hir.Q (vscode-file://vscode-app/c:/Users/Bek/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:492:17519)
at hir.M (vscode-file://vscode-app/c:/Users/Bek/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:492:16607)
at hir.L (vscode-file://vscode-app/c:/Users/Bek/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:492:15708)
at Bwt.value (vscode-file://vscode-app/c:/Users/Bek/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:492:14500)
at ve.B (vscode-file://vscode-app/c:/Users/Bek/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:48:2398)
at ve.fire (vscode-file://vscode-app/c:/Users/Bek/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:48:2617)
at Git.fire (vscode-file://vscode-app/c:/Users/Bek/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:4744:10379)
at u.onmessage (vscode-file://vscode-app/c:/Users/Bek/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:6968:12271)

Steps to Reproduce

Try to use Gemini 2.5 Pro with API Key

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.2.4 (user setup)
VSCode Version: 1.99.3
Commit: a8e95743c5268be73767c46944a71f4465d05c90

Does this stop you from using Cursor

No - Cursor works, but with this issue

Request ID: 27a23b2a-3f27-4c17-8f90-a37347f5d767
{“error”:“ERROR_BAD_USER_API_KEY”,“details”:{“title”:“Bad User API key”,“detail”:“Unauthorized User API key”,“isRetryable”:false,“additionalInfo”:{},“buttons”:},“isExpected”:true}
ConnectError: [unauthenticated] Error
at x9a.$endAiConnectTransportReportError (vscode-file://vscode-app/c:/Users/{redacted}/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:4757:223764)
at hir.S (vscode-file://vscode-app/c:/Users/{redacted}/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:492:17741)
at hir.Q (vscode-file://vscode-app/c:/Users/{redacted}/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:492:17519)
at hir.M (vscode-file://vscode-app/c:/Users/{redacted}/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:492:16607)
at hir.L (vscode-file://vscode-app/c:/Users/{redacted}/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:492:15708)
at Bwt.value (vscode-file://vscode-app/c:/Users/{redacted}/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:492:14500)
at ve.B (vscode-file://vscode-app/c:/Users/{redacted}/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:48:2398)
at ve.fire (vscode-file://vscode-app/c:/Users/{redacted}/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:48:2617)
at Git.fire (vscode-file://vscode-app/c:/Users/{redacted}/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:4744:10379)
at u.onmessage (vscode-file://vscode-app/c:/Users/{redacted}/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:6968:12271)

1 Like

hi @Bekalu_Temesgen and @akhimien_clement thank you both for posting a detailed bug report. I will forward it to Cursor Team for review.

Cc @danperks

1 Like

Describe the Bug

After typing my api key and trying to do a request I receive this error message:
We encountered an issue when using your API key: Provider was unable to process your request API Error: Request failed with status code 404: [{ "error": { "code": 404, "message": "models/gemini-2.5-pro-latest is not found for API version v1main, or is not supported for generateContent. Call ListModels to see the list of available models and their supported methods.", "status": "NOT_FOUND" } } ]

It is the same for all Gemini 2.5 models. Does somebody encounter the same error?

Steps to Reproduce

Type in API key from Google AI Studio and try a request.

Expected Behavior

Fulfil the command of the request

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.1.7 (Universal)
VSCode Version: 1.96.2
Commit: 7111807980fa9c93aedd455ffa44b682c0dc1350
Date: 2025-07-01T07:26:06.233Z (2 wks ago)
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin x64 24.5.0

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report. We are already investigating this issue.

Hey deanrie, do you know when this issue get fixed? It goes now on for couple of days

@deanrie It’s so weird now :slight_smile:


Same thing happening for me, here is the error log :

Request ID: 5ddb824d-2509-46fd-9ce6-8c2185d57f84
{"error":"ERROR_OPENAI","details":{"title":"Unable to reach the model provider","detail":"We encountered an issue when using your API key: Provider was unable to process your request\n\nAPI Error:\n\n```\nRequest failed with status code 429: [{\n  \"error\": {\n    \"code\": 429,\n    \"message\": \"Gemini 2.5 Pro Preview doesn't have a free quota tier. For more information on this error, head to: https://ai.google.dev/gemini-api/docs/rate-limits.\",\n    \"status\": \"RESOURCE_EXHAUSTED\",\n    \"details\": [\n      {\n        \"@type\": \"type.googleapis.com/google.rpc.QuotaFailure\",\n        \"violations\": [\n          {\n            \"quotaMetric\": \"generativelanguage.googleapis.com/generate_content_free_tier_input_token_count\",\n            \"quotaId\": \"GenerateContentInputTokensPerModelPerDay-FreeTier\",\n            \"quotaDimensions\": {\n              \"location\": \"global\",\n              \"model\": \"gemini-2.5-pro-exp\"\n            }\n          },\n          {\n            \"quotaMetric\": \"generativelanguage.googleapis.com/generate_content_free_tier_requests\",\n            \"quotaId\": \"GenerateRequestsPerDayPerProjectPerModel-FreeTier\",\n            \"quotaDimensions\": {\n              \"location\": \"global\",\n              \"model\": \"gemini-2.5-pro-exp\"\n            }\n          },\n          {\n            \"quotaMetric\": \"generativelanguage.googleapis.com/generate_content_free_tier_requests\",\n            \"quotaId\": \"GenerateRequestsPerMinutePerProjectPerModel-FreeTier\",\n            \"quotaDimensions\": {\n              \"location\": \"global\",\n              \"model\": \"gemini-2.5-pro-exp\"\n            }\n          },\n          {\n            \"quotaMetric\": \"generativelanguage.googleapis.com/generate_content_free_tier_input_token_count\",\n            \"quotaId\": \"GenerateContentInputTokensPerModelPerMinute-FreeTier\",\n            \"quotaDimensions\": {\n              \"location\": \"global\",\n              \"model\": \"gemini-2.5-pro-exp\"\n            }\n          }\n        ]\n      },\n      {\n        \"@type\": \"type.googleapis.com/google.rpc.Help\",\n        \"links\": [\n          {\n            \"description\": \"Learn more about Gemini API quotas\",\n            \"url\": \"https://ai.google.dev/gemini-api/docs/rate-limits\"\n          }\n        ]\n      },\n      {\n        \"@type\": \"type.googleapis.com/google.rpc.RetryInfo\",\n        \"retryDelay\": \"43s\"\n      }\n    ]\n  }\n}\n]\n```","additionalInfo":{},"buttons":[]},"isExpected":true}
ConnectError: [invalid_argument] Error
    at x9a.$endAiConnectTransportReportError (vscode-file://vscode-app/c:/Program%20Files/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:4757:223764)
    at hir.S (vscode-file://vscode-app/c:/Program%20Files/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:492:17741)
    at hir.Q (vscode-file://vscode-app/c:/Program%20Files/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:492:17519)
    at hir.M (vscode-file://vscode-app/c:/Program%20Files/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:492:16607)
    at hir.L (vscode-file://vscode-app/c:/Program%20Files/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:492:15708)
    at Bwt.value (vscode-file://vscode-app/c:/Program%20Files/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:492:14500)
    at ve.B (vscode-file://vscode-app/c:/Program%20Files/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:48:2398)
    at ve.fire (vscode-file://vscode-app/c:/Program%20Files/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:48:2617)
    at Git.fire (vscode-file://vscode-app/c:/Program%20Files/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:4744:10379)
    at u.onmessage (vscode-file://vscode-app/c:/Program%20Files/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:6968:12271)

I see those kind of bug reports all around the forum. I am having the same issue with Azure OpenAI keys. Can we get an answer from the product team?
All the forum is full of comments like “Cursor doesn’t want you to use your API keys so u keep paying” and we all agree with it.

30+ reports for months, for such a great tool. I don’t think it’s out of your capabilities to fix such a simple things like this if not in purpose.

Hey, if your gemini-2.5-pro model isn’t working, try disabling the MCP servers, especially if you have MCP Git. It seems to be causing the error, and we’re working on fixing it.

2 Likes

Hey, thanks for the report. I believe we’ll fix this soon.

Hey @deanrie I don’t have any MCP Server enabled, but the Gemini is not getting recognized with my API key, as mentioned with the error log of the report.
Are there any news?

I have removed all MCP servers, still having the same issue

1 Like

Sorry, MCP servers aren’t related to this issue with your API key. It concerns subscription models, but the team is already working on fixing it.

This have been going for at least 2 weeks now, how long should we wait ?

4 Likes

@deanrie
I’d love to be able to use gemini again

+1 same

Yes the max mode is enabled