Gemini API key not working in Cursor, getting PROVIDER_ERROR

Dang. this is a great workaround. it did help!

Thank you so much. :laughing: It works!

Dang. this is a great workaround. it did help ! Thank you so much

This workaround didn’t work for me. Is this the same issues I’m seeing with the following provider error?

Provider returned error: [{ “error”: { “code”: 400, “message”: “Invalid JSON (for ‘extra_body’): no such field: ‘disable_thought_tag’”, “status”: “INVALID_ARGUMENT” } } ]

the workaround was working and now it doesn’t anymore

yup. They killed the workaround in less then 24 hours after it was discovered but they unwilling to fix the bug that created the need for that workaround for weeks.
You can deduct opinions yourselves

Shockingly, the same error occurs even through the proprietary Google model linked to the cursor!

The “disable_thought_tag” error message indicates that this is the problem.

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

For gemini-3.1-pro used either via key in Gemini Studio or via OpenRouter I’m getting this error:

Request ID: 50057731-32cf-4464-83b5-00750d8d8150
{“error”:“ERROR_PROVIDER_ERROR”,“details”:{“title”:“Provider Error”,“detail”:“Provider returned error: [{\n "error": {\n "code": 400,\n "message": "Invalid JSON (for ‘extra_body’): no such field: ‘disable_thought_tag’",\n "status": "INVALID_ARGUMENT"\n }\n}\n]”,“isRetryable”:false,“additionalInfo”:{},“buttons”:,“planChoices”:},“isExpected”:true}
Provider Error Provider returned error: [{
“error”: {
“code”: 400,
“message”: “Invalid JSON (for ‘extra_body’): no such field: ‘disable_thought_tag’”,
“status”: “INVALID_ARGUMENT”
}
}
]
Cvs: Provider Error Provider returned error: [{
“error”: {
“code”: 400,
“message”: “Invalid JSON (for ‘extra_body’): no such field: ‘disable_thought_tag’”,
“status”: “INVALID_ARGUMENT”
}
}
]
at Pf_ (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:29432:24260)
at Rf_ (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:29432:23144)
at Uf_ (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:29433:6490)
at q0h.run (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:29433:11307)
at async cQi.runAgentLoop (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:41748:12418)
at async Vnm.streamFromAgentBackend (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:41816:12344)
at async Vnm.getAgentStreamResponse (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:41816:19567)
at async lCt.submitChatMaybeAbortCurrent (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:29548:16906)
at async Object.Va [as onSubmit] (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:40804:4230)
at async vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:40803:100980


Request ID: ca9af5d5-59e9-40ce-abb2-4adbac824e4e
{“error”:“ERROR_PROVIDER_ERROR”,“details”:{“title”:“Provider Error”,“detail”:“Provider returned error: [{\n "error": {\n "code": 400,\n "message": "Invalid JSON (for ‘extra_body’): no such field: ‘disable_thought_tag’",\n "status": "INVALID_ARGUMENT"\n }\n}\n]”,“isRetryable”:false,“additionalInfo”:{},“buttons”:,“planChoices”:},“isExpected”:true}
Provider Error Provider returned error: [{
“error”: {
“code”: 400,
“message”: “Invalid JSON (for ‘extra_body’): no such field: ‘disable_thought_tag’”,
“status”: “INVALID_ARGUMENT”
}
}
]
Cvs: Provider Error Provider returned error: [{
“error”: {
“code”: 400,
“message”: “Invalid JSON (for ‘extra_body’): no such field: ‘disable_thought_tag’”,
“status”: “INVALID_ARGUMENT”
}
}
]
at Pf_ (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:29432:24260)
at Rf_ (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:29432:23144)
at Uf_ (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:29433:6490)
at q0h.run (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:29433:11307)
at async cQi.runAgentLoop (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:41748:12418)
at async Vnm.streamFromAgentBackend (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:41816:12344)
at async Vnm.getAgentStreamResponse (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:41816:19567)
at async lCt.submitChatMaybeAbortCurrent (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:29548:16906)
at async Object.Va [as onSubmit] (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:40804:4230)
at async vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:40803:101457


Request ID: 2beffe36-7979-488b-8d56-430aefa0af4e
{“error”:“ERROR_PROVIDER_ERROR”,“details”:{“title”:“Provider Error”,“detail”:“Provider returned error: [{\n "error": {\n "code": 400,\n "message": "Invalid JSON (for ‘extra_body’): no such field: ‘disable_thought_tag’",\n "status": "INVALID_ARGUMENT"\n }\n}\n]”,“isRetryable”:false,“additionalInfo”:{},“buttons”:,“planChoices”:},“isExpected”:true}
Provider Error Provider returned error: [{
“error”: {
“code”: 400,
“message”: “Invalid JSON (for ‘extra_body’): no such field: ‘disable_thought_tag’”,
“status”: “INVALID_ARGUMENT”
}
}
]
Cvs: Provider Error Provider returned error: [{
“error”: {
“code”: 400,
“message”: “Invalid JSON (for ‘extra_body’): no such field: ‘disable_thought_tag’”,
“status”: “INVALID_ARGUMENT”
}
}
]
at Pf_ (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:29432:24260)
at Rf_ (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:29432:23144)
at Uf_ (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:29433:6490)
at q0h.run (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:29433:11307)
at async cQi.runAgentLoop (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:41748:12418)
at async Vnm.streamFromAgentBackend (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:41816:12344)
at async Vnm.getAgentStreamResponse (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:41816:19567)
at async lCt.submitChatMaybeAbortCurrent (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:29548:16906)
at async Object.Va [as onSubmit] (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:40804:4230)
at async vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:40803:100980


Steps to Reproduce

Run Cursor with gemini-3.1-pro

Expected Behavior

To work

Operating System

MacOS

Version Information

Version: 3.2.11
VSCode Version: 1.105.1
Commit: e9ee1339915a927dfb2df4a836dd9c8337e17cc0
Date: 2026-04-24T14:36:47.933Z
Layout: editor
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Darwin arm64 25.4.0

For AI issues: which model did you use?

gemini-3.1-studio

For AI issues: add Request ID with privacy disabled

Request ID: 3181baa3-d316-402d-a031-0cf7d7a9c263
{“error”:“ERROR_PROVIDER_ERROR”,“details”:{“title”:“Provider Error”,“detail”:“Provider returned error: [{\n "error": {\n "code": 400,\n "message": "Invalid JSON (for ‘extra_body’): no such field: ‘disable_thought_tag’",\n "status": "INVALID_ARGUMENT"\n }\n}\n]”,“isRetryable”:false,“additionalInfo”:{},“buttons”:,“planChoices”:},“isExpected”:true}
Provider Error Provider returned error: [{
“error”: {
“code”: 400,
“message”: “Invalid JSON (for ‘extra_body’): no such field: ‘disable_thought_tag’”,
“status”: “INVALID_ARGUMENT”
}
}
]
Cvs: Provider Error Provider returned error: [{
“error”: {
“code”: 400,
“message”: “Invalid JSON (for ‘extra_body’): no such field: ‘disable_thought_tag’”,
“status”: “INVALID_ARGUMENT”
}
}
]
at Pf_ (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:29432:24260)
at Rf_ (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:29432:23144)
at Uf_ (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:29433:6490)
at q0h.run (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:29433:11307)
at async cQi.runAgentLoop (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:41748:12418)
at async Vnm.streamFromAgentBackend (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:41816:12344)
at async Vnm.getAgentStreamResponse (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:41816:19567)
at async lCt.submitChatMaybeAbortCurrent (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:29548:16906)
at async Object.Va [as onSubmit] (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:40804:4230)
at async vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:40803:100980

Does this stop you from using Cursor

Yes - Cursor is unusable

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

We’re having trouble finding the resource you requested. If the problem persists, please contact support.
Request ID: e1ef7930-c237-4203-b750-223b6179f10e
{“error”:“ERROR_PROVIDER_ERROR”,“details”:{“title”:“Provider Error”,“detail”:“We’re having trouble finding the resource you requested. If the problem persists, please contact support.”,“isRetryable”:false,“additionalInfo”:{},“buttons”:,“planChoices”:},“isExpected”:true}
Provider Error We’re having trouble finding the resource you requested. If the problem persists, please contact support.
Cvs: Provider Error We’re having trouble finding the resource you requested. If the problem persists, please contact support.
at Pf_ (vscode-file://vscode-app/d:/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:29432:24260)
at Rf_ (vscode-file://vscode-app/d:/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:29432:23144)
at Uf_ (vscode-file://vscode-app/d:/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:29433:6490)
at q0h.run (vscode-file://vscode-app/d:/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:29433:11307)
at async cQi.runAgentLoop (vscode-file://vscode-app/d:/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:41748:12418)
at async Vnm.streamFromAgentBackend (vscode-file://vscode-app/d:/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:41816:12344)
at async Vnm.getAgentStreamResponse (vscode-file://vscode-app/d:/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:41816:19567)
at async lCt.submitChatMaybeAbortCurrent (vscode-file://vscode-app/d:/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:29548:16906)
at async Va (vscode-file://vscode-app/d:/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:40804:4230)

Steps to Reproduce

cannot use cursor anymore

Expected Behavior

every time notes like this

Operating System

Windows 10/11

Version Information

Version: 3.2.11 (user setup)
VSCode Version: 1.105.1
Commit: e9ee1339915a927dfb2df4a836dd9c8337e17cc0
Date: 2026-04-24T14:36:47.933Z
Layout: editor
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.19045

Does this stop you from using Cursor

Yes - Cursor is unusable

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

When using Gemini 3.1 through a Google API key / BYOK, the request fails before completion. Cursor surfaces this provider error:

Provider returned error: [{ “error”: { “code”: 400, “message”: “Invalid JSON (for ‘extra_body’): no such field: ‘disable_thought_tag’”, “status”: “INVALID_ARGUMENT” } }]

This looks like Cursor is sending an extra_body field named disable_thought_tag that Google’s API rejects.

Steps to Reproduce

  1. Enable/use a Google API key in Cursor.
  2. Select Gemini 3.1 as the model.
  3. Send any chat or agent request.
  4. Observe the provider error above.

Expected Behavior

Gemini 3.1 should work when Google API key support is enabled, or Cursor should omit provider-specific request fields that Google’s API does not accept.

Operating System

MacOS

Version Information

IDE:
Version: 3.1.15
VSCode Version: 1.105.1
Commit: 3a67af7b780e0bfc8d32aefa96b8ff1cb8817f80

For AI issues: which model did you use?

Gemini 3.1 with Google API key / BYOK

For AI issues: add Request ID with privacy disabled

Not available in this report. The visible provider error is: Invalid JSON (for ‘extra_body’): no such field: ‘disable_thought_tag’.

Additional Information

Operating system reported by the machine: macOS / Darwin 25.1.0. Cursor otherwise works; this appears limited to the Gemini 3.1 + Google API key path.

Does this stop you from using Cursor

No - Cursor works, but with this issue

facing the same issue

This is literally blocking our entire team’s workflow. We’ve been dead in the water for days because of this PROVIDER_ERROR.

Is anyone from Cursor actually looking at this? We are actively losing time and money waiting on a patch. We need a hotfix or a real ETA today—we can’t keep working like this. Please tell us someone is on it.
Please prioritize !!!

Hey everyone!

  1. We are working on a fix, and should have an update for you soon!
    2. As @PotatoJet mentioned above, adding gemini-3.1-pro-preview seems to help users get around the issue for now.

We apologize for the issue, and we’re working to get you back in a better state!

addinggemini-3.1-pro-preview to custom model seems not works for me

Same, Tried adding gemini-3.1-pro-previewdoesn’t work. It still return
Provider returned error: [{ “error”: { “code”: 400, “message”: “Invalid JSON (for ‘extra_body’): no such field: ‘disable_thought_tag’”, “status”: “INVALID_ARGUMENT” } }].

Please prioritize the fix for this.

After various attempts, I found a solution.

  1. Downgrade - Delete the existing cursor and install version 3.0.

  2. Chat using Gemini 2.5 Flash - Run any chat once.

  3. Chat using Gemini 3.1 Pro - Works.

cf) This method does not work for existing chats. It only works for new chats.
cf2) Not work always. Try many times…

this workaround doesn’t work so this is a blocker.

Hey everyone,

Thanks for your patience. We’ve deployed a fix, and I believe most cases reported here should be working now. It would be great to have your confirmation!

We are aware of a seperate bug with custom model slugs that still receive disable_thought_tag errors, however, Gemini 3.x models should be working now.

1 Like

for anyone who still getting error, go to Cursor · Download and download the latest version instead of auto-update within the app.

still getting same error i got since yesterday:

Request ID: fa36f981-8d51-4087-a436-3af57766f530
{“error”:“ERROR_PROVIDER_ERROR”,“details”:{“title”:“Provider Error”,“detail”:“Provider returned error: [{\n “error”: {\n “code”: 400,\n “message”: “Invalid JSON (for ‘extra_body’): no such field: ‘disable_thought_tag’”,\n “status”: “INVALID_ARGUMENT”\n }\n}\n]”,“isRetryable”:false,“additionalInfo”:{},“buttons”:,“planChoices”:},“isExpected”:true}
Provider Error Provider returned error: [{
“error”: {
“code”: 400,
“message”: “Invalid JSON (for ‘extra_body’): no such field: ‘disable_thought_tag’”,
“status”: “INVALID_ARGUMENT”
}
}
]
Svs: Provider Error Provider returned error: [{
“error”: {
“code”: 400,
“message”: “Invalid JSON (for ‘extra_body’): no such field: ‘disable_thought_tag’”,
“status”: “INVALID_ARGUMENT”
}
}
]
at cg_ (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:29432:24260)
at ag_ (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:29432:23144)
at gg_ (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:29433:6490)
at tCh.run (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:29433:11307)
at async lQi.runAgentLoop (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:41749:12418)
at async him.streamFromAgentBackend (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:41817:12344)
at async him.getAgentStreamResponse (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:41817:19567)
at async pCt.submitChatMaybeAbortCurrent (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:29548:16906)
at async Xa (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:40804:4244)

on version:

Version: 3.2.14
VSCode Version: 1.105.1
Commit: 6e821a7fc68d5ce5b4ab821f73fe4137e0851e60
Date: 2026-04-28T13:25:40.706Z
Layout: editor
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Darwin arm64 24.6.0