{
"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"
}
}
The code tries to call
curl https://generativelanguage.googleapis.com/v1beta/models/gemini-1.0-pro:generateContent -H "Content-Type: application/json" --header "X-Goog-Api-Key: XXXXXXXXXXXXXX" --header "anthropic-version: 2023-06-01" -d '{
"generationConfig": {},
"safetySettings": [],
"contents": [
{
"role": "user",
"parts": [
{
"text": "Testing. Just say hi and nothing else."
}
]
}
]
}'
As per gemini API 18th Feb update, gemini 1.0 pro is no longer available.
Try all options exposed here in thread without success.
Error:
{
"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"
}
}
if I use the curl suggested by google to test, this works fine:
curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=GEMINI_API_KEY" \
-H 'Content-Type: application/json' \
-X POST \
-d '{
"contents": [{
"parts":[{"text": "Explain how AI works"}]
}]
}'
This issue occurs in Cursor 0.45.17.
It does not occur in Cursor 0.47.8.
The reason is that it tries to verify the api key via models/gemini-1.0-pro, which is no longer supported by google.
{
"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"
}
}
Updating to the latest version does not cause this problem.
Unfortunately, in my CodeBase, 0.47 does something stupid
that prevents even simple Markdown modifications (whether Sonnet 3.7, gemini, or o1).
I can’t update it…
The only current workaround in 0.45.17 is to not use the custom google API KEY.
Version: 0.47.8
VSCode Version: 1.96.2
OS: Darwin arm64 24.3.0
{
“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”
}
}
How exactly do you do this? We can check the already present models (including the Gemini ones) but that is subject to the 50 requests quota I think. how do you add new model with your own API key?
Just checked this. I don’t get the option to add API key when I add the model but when I use Gemini models it doesn’t increase my request count so I guess it does use the API key I added even if it is unable to validate it. Anyways thanks for this.
I thought you meant that we get the option to add the API key seperately everytime we add a new model (specific to that model). But I didn’t see anything there except the option to add the model name. I realised that it is using the same API key that we add in the Cursor Settings > Models (then one which has like 3 options - OpenAI, Anthropic, Google) even if it wasn’t able to validate it.
Cursor is clearly ignoring this issue as it is easy to fix. The reason why we get the error message that says gemini 1.0 pro doesn’t exist is because it no longer is usable with the google api key. I believe cursor is planning on phasing out their allowing you to use their key. Which is extremely annoying, enshitification continues. I DO NOT want to have to pay extra to use “max” when I can simply use the key?