How to integrate the new Gemini model Gemini-1.5-Pro-002 announced today?

Is there a tutorial on how to add this latest model to Cursor via the API key?
When I add the API key from AI studio to Cursor, (https://aistudio.google.com/app/apikey), I only see the previous Gemini Flash 1.5 model.

The announcement is here and its performance looks very promising. I’d like to try it vs Sonnet.

2 Likes

HI @nyrulez

You can manually add the model in the Cursor settings. I just checked, and everything works fine.

1 Like

Hi @deanrie ,
How are you able to add the API key for above? Can you explain more fully?

When I add the API key I get from AI studio and add the model name in cursor, I get the following error in Cursor:

FYI, I can access the model just fine from my commandline. Below works perfectly. So not sure why Cursor cannot access it?

I am using the same API key.

curl
-H ‘Content-Type: application/json’
-d ‘{“contents”:[{“parts”:[{“text”:“Explain how AI works”}]}]}’
-X POST ‘https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-pro-002:generateContent?key=AIzapG…’

Ok it worked. The issue was that model name has to be all lower case, not as google spells it out.

So the complete process is:

  1. Go to AI Studio and enable API key. Add billing. https://aistudio.google.com/app/apikey

  2. Click the Settings icon on top right of Cursor, add the API key:

  3. Add the following models to the model list:

a. gemini-1.5-pro-002
b. gemini-1.5-flash-002

They work great so far!

4 Likes

what is the new gemini good for, is it good at coding? which language you use it for? (is it better than o1-mini?)

2 Likes

Can confirm that it also worked, just adding to model, with an GOOGLE API KEY activated

1 Like

I’ve been trying the Gemini models a lot more. I haven’t encountered a use case so far where Claude Sonnet didn’t do it better than the latest Gemini models.

3 Likes

Its faster, and u can input more context, but claude sonnet is more capable for sure. Nonetheless its been very useful for large file editing for me at least.

1 Like

I imported the Gemini just fine but sadly is says it is not a vision model. That is critical bug as screenshots are so important for my workflow.

1 Like

I was playing with it, it seems quite strong - similar level to Claude, maybe slightly weaker. I hit “rate limits” within a few requests. The new 002 model is not shown in my quotas page on Google Cloud.

The apply model is pretty broken with its output so I had to manually take most of its edit suggestions and apply them by selecting all text in a file and "edit"ing it with the suggested changes and claude sonnet.

Be aware folks that the prices dont go down until 1st Oct, it’s redic expensive now i.e. 7/21 dollars per M for >128K

1 Like

I have also noticed that gemini 1.5pro 002 has a nasty habit of recommending no-op changes across all your files, so it spools off a million applys to your code which do nothing, then you hit the rate limit of the Cursor apply model and it moans at you

Can anyone tell me why the model does not work with screenshot inputs when it should???