Cannot Add New Google API Key

Issue

When adding a Google API key, Cursor always tests with Gemini 1.0, but new API keys do not support Gemini 1.0. This causes an error, making it hard to add new API keys.

Error Message

{
  "error": {
    "code": 404,
    "message": "models/gemini-1.0-pro is not found for API version v1beta, or is not supported for generateContent. Call ListModels to see the list of available models and their supported methods.",
    "status": "NOT_FOUND"
  }
}

Another way to realize this is by manually copying the command Cursor uses to test and running it:

$ curl https://generativelanguage.googleapis.com/v1beta/models/gemini-1.0-pro:generateContent -H "Content-Type: application/json" -H "X-Goog-Api-Key: GOOGLE_API_KEY" -d '{"generationConfig":{},"safetySettings":[],"contents":[{"role":"user","parts":[{"text":"Testing. Just say hi and nothing else."}]}]}'

Outputs:

{
  "error": {
    "code": 404,
    "message": "models/gemini-1.0-pro is not found for API version v1beta, or is not supported for generateContent. Call ListModels to see the list of available models and their supported methods.",
    "status": "NOT_FOUND"
  }
}

But using a newer model like 2.5 with same API key:

curl https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro-exp-03-25:generateContent -H "Content-Type: application/json" -H "X-Goog-Api-Key: GOOGLE_" -d '{"generationConfig":{},"safetySettings":[],"contents":[{"role":"user","parts":[{"text":"Testing. Just say hi and nothing else."}]}]}'

Outputs

  "candidates": [
    {
      "content": {
        "parts": [
          {
            "text": "Hi"
          }
        ],
        "role": "model"
      },
      "finishReason": "STOP",
      "index": 0
    }
  ],
  "usageMetadata": {
    "promptTokenCount": 10,
    "candidatesTokenCount": 1,
    "totalTokenCount": 11,
    "promptTokensDetails": [
      {
        "modality": "TEXT",
        "tokenCount": 10
      }
    ]
  },
  "modelVersion": "gemini-2.5-pro-exp-03-25"
}

Steps to Reproduce

  1. Go to SettingsAdd Google API Key
  2. Paste a new Google API key
  3. Cursor tests with Gemini 1.0, and the error appears

Even if you add the new API key successfully, it still may not solve your issue. I attempted it this morning to get around the Gemini rate limit error and was met with this error instead:

somehow, its fixed after the latest update they just shipped hours ago