Gemini 4 models fail with Provider Error 401 (invalid_grant: Invalid JWT Signature)

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

All Gemini 4 models fail in Cursor with “Provider Error” (providerStatusCode 401). Other models (Claude) work normally on the same account and machine.

Local Cursor logs (agent_exec, “Error in consumeStream”) show:
ConnectError: [unknown] invalid_grant: Invalid JWT Signature.

A later attempt returned:
ConnectError: [resource_exhausted] Error

Steps to Reproduce

  1. Remove the Google API key in Settings > Models > API Keys (so Cursor’s built-in Gemini access is used).
  2. Select Gemini 4 Argon in the chat model picker (or run a subagent with model gemini-4-argon-medium).
  3. Send any message.
  4. The request fails immediately with Provider Error (401). Switching to Claude works.

Expected Behavior

Gemini 4 should respond normally through Cursor’s built-in model access.

Operating System

Windows 10/11

Version Information

Cursor 3.27.22 (stable, Windows x64)

For AI issues: which model did you use?

Gemini 4 Argon

For AI issues: add Request ID with privacy disabled

87234ebb-0733-4e9c-956a-2038d402f987
7c0853ea-8fe4-443d-9491-4c3838e21fac

Additional Information

  • I do not use my own Google API key; it was removed before reproducing.
  • System clock is correct (within 4 seconds of internet time), so this is not clock skew.
  • Override OpenAI Base URL is not set, and “use OpenAI key” / “use Google key” are both off.
  • Since the key is removed and the clock is correct, this looks like a server-side credential issue on the Gemini provider.

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hi there.

This issue should be resolved now.