The provider refused to serve this request based on the content using Gemini 2.5 Pro

Describe the Bug

The provider refused to serve this request based on the content

Steps to Reproduce

Using auto to fix the failing test cases, then continue using Sonnet 4 (Thinking), then proceed with using Gemini 2.5 Pro

Expected Behavior

The agent should continue on cleaning up the test

Screenshots / Screen Recordings

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.2.4
VSCode Version: 1.99.3
Commit: a8e95743c5268be73767c46944a71f4465d05c90
Date: 2025-07-10T16:53:59.659Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin arm64 23.0.0

Additional Information

Request ID: 18576b34-e575-44e8-bfd4-b4fcc98dffa3
{“error”:“ERROR_UNAUTHORIZED”,“details”:{“title”:“Unauthorized request.”,“detail”:“The provider refused to serve this request based on the content”,“isRetryable”:false,“additionalInfo”:{},“buttons”:},“isExpected”:true}
ConnectError: [unauthenticated] Error
at x9a.$endAiConnectTransportReportError (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:4757:223764)
at hir.S (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:492:17741)
at hir.Q (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:492:17519)
at hir.M (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:492:16607)
at hir.L (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:492:15708)
at Bwt.value (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:492:14500)
at ve.B (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:48:2398)
at ve.fire (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:48:2617)
at Git.fire (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:4744:10379)
at u.onmessage (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:6968:12271)

Does this stop you from using Cursor

No - Cursor works, but with this issue

I tried using the auto model, but it didn’t help since it doesn’t really solve the issue. Using Sonnet 4 Thinking might work, but it’s also quite costly—just like Sonnet 4 itself. So I attempt on using Gemini 2.5 Pro, but ended up getting that error

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

I had this same issue happen on VSCode + Gemini Code Assist (not using Cursor).

The refusal to serve content is some Gemini issue

Ah yeah, that makes sense. I actually remember getting a response from Gemini a few weeks ago that went something like this:

I am truly sorry for the repeated failures. It's clear that my approach is not working and is only making things worse. I seem to be stuck in a loop of incorrect edits.
I will stop and let you take over. Please proceed with fixing the tests. I have made a mess, and I believe a fresh start from you would be the most effective way to resolve this. I will not attempt any more edits.

This one is issues with the edit_tool if it fails like 3+ times. I think it’s different than the content failure issue which is some censorsing thing Gemini does

Got this one too. And of course always happens at the end of a thinking cycle cause why not. Now I personally work at a very ordinary facility somewhere near Langley Virginia so I have no idea why Gemini wouldn’t want to execute my Ira…my perfectly normal code.

Same here!! Keep getting them (on gemini 2.5 pro max), got about 5 this morning and keep going…


I also am getting this error over and over again.

image

Hey everyone, thanks for the reports. Could you share the request ID? For this, you need to disable privacy mode if it’s enabled, then reproduce the issue when it happens again and copy the ID.

cc @danperks

Got the same error here, over and over again…
The provider refused to serve this request based on the content

Request ID: 0b639b46-8f01-4d7b-a35d-7a2dfc93e011
{“error”:“ERROR_UNAUTHORIZED”,“details”:{“title”:“Unauthorized request.”,“detail”:“The provider refused to serve this request based on the content”,“isRetryable”:false,“additionalInfo”:{},“buttons”:},“isExpected”:true}
ConnectError: [unauthenticated] Error
at x9a.$endAiConnectTransportReportError (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:4757:223764)
at hir.S (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:492:17741)
at hir.Q (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:492:17519)
at hir.M (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:492:16607)
at hir.L (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:492:15708)
at Bwt.value (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:492:14500)
at ve.B (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:48:2398)
at ve.fire (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:48:2617)
at Git.fire (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:4744:10379)
at u.onmessage (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:6968:12271)