Most active commenters
  • behnamoh(5)
  • sachinag(3)

←back to thread

Gemini CLI

(blog.google)
1336 points sync | 31 comments | | HN request time: 0.001s | source | bottom
Show context
iandanforth ◴[] No.44377207[source]
I love how fragmented Google's Gemini offerings are. I'm a Pro subscriber, but I now learn I should be a "Gemini Code Assist Standard or Enterprise" user to get additional usage. I didn't even know that existed! As a run of the mill Google user I get a generous usage tier but paying them specifically for "Gemini" doesn't get me anything when it comes to "Gemini CLI". Delightful!
replies(21): >>44377223 #>>44377234 #>>44377268 #>>44377361 #>>44377524 #>>44377663 #>>44377759 #>>44377818 #>>44378537 #>>44378591 #>>44378915 #>>44379216 #>>44380359 #>>44382462 #>>44383491 #>>44384124 #>>44384673 #>>44384735 #>>44385178 #>>44385385 #>>44386691 #
1. behnamoh ◴[] No.44377524[source]
Actually, that's the reason a lot of startups and solo developers prefer non-Google solutions, even though the quality of Gemini 2.5 Pro is insanely high. The Google Cloud Dashboard is a mess, and they haven't fixed it in years. They have Vertex that is supposed to host some of their models, but I don't understand what's the difference between that and their own cloud. And then you have two different APIs depending on the level of your project: This is literally the opposite of what we would expect from an AI provider where you start small and regardless of the scale of your project, you do not face obstacles. So essentially, Google has built an API solution that does not scale because as soon as your project gets bigger, you have to switch from the Google AI Studio API to the Vertex API. And I find it ridiculous because their OpenAI compatible API does not work all the time. And a lot of tools that rely on that actually don't work.

Google's AI offerings that should be simplified/consolidated:

- Jules vs Gemini CLI?

- Vertex API (requires a Google Cloud Account) vs Google AI Studio API

Also, since Vertex depends on Google Cloud, projects get more complicated because you have to modify these in your app [1]:

``` # Replace the `GOOGLE_CLOUD_PROJECT` and `GOOGLE_CLOUD_LOCATION` values # with appropriate values for your project. export GOOGLE_CLOUD_PROJECT=GOOGLE_CLOUD_PROJECT export GOOGLE_CLOUD_LOCATION=global export GOOGLE_GENAI_USE_VERTEXAI=True ```

[1]: https://cloud.google.com/vertex-ai/generative-ai/docs/start/...

replies(4): >>44377931 #>>44378027 #>>44378498 #>>44378744 #
2. tarvaina ◴[] No.44377931[source]
It took me a while but I think the difference between Vertex and Gemini APIs is that Vertex is meant for existing GCP users and Gemini API for everyone else. If you are already using GCP then Vertex API works like everything else there. If you are not, then Gemini API is much easier. But they really should spell it out, currently it's really confusing.

Also they should make it clearer which SDKs, documents, pricing, SLAs etc apply to each. I still get confused when I google up some detail and end up reading the wrong document.

replies(4): >>44378649 #>>44380895 #>>44382672 #>>44388982 #
3. coredog64 ◴[] No.44378027[source]
At least a bunch of people got promotions for demonstrating scope via the release of a top-level AI product.
4. cperry ◴[] No.44378498[source]
@sachinag is afk but wanted me to flag that he's on point for fixing the Cloud Dashboard - it's WIP!
replies(3): >>44378575 #>>44378681 #>>44380750 #
5. WXLCKNO ◴[] No.44378575[source]
You guys should try my AGI test.

It's easy, you just ask the best Google Model to create a script that outputs the number of API calls made to the Gemini API in a GCP account.

100% fail rate so far.

replies(1): >>44381663 #
6. fooster ◴[] No.44378649[source]
The other difference is that reliability for the gemini api is garbage, whereas for vertex ai it is fantastic.
replies(1): >>44381368 #
7. sachinag ◴[] No.44378681[source]
Thanks Chris!

"The Google Cloud Dashboard is a mess, and they haven't fixed it in years." Tell me what you want, and I'll do my best to make it happen.

In the interim, I would also suggest checking out Cloud Hub - https://console.cloud.google.com/cloud-hub/ - this is us really rethinking the level of abstraction to be higher than the base infrastructure. You can read more about the philosophy and approach here: https://cloud.google.com/blog/products/application-developme...

replies(3): >>44378993 #>>44384464 #>>44385783 #
8. irthomasthomas ◴[] No.44378744[source]
I just use gemini-pro via openrouter API. No painful clicking around on the cloud to find the billing history.
replies(1): >>44378764 #
9. behnamoh ◴[] No.44378764[source]
but you won't get the full API capabilities of Gemini (like setting the safety level).
10. behnamoh ◴[] No.44378993{3}[source]
One more suggestion: Please remove the need to make a project before we can use Gemini API. That seriously impedes our motivation in using Gemini for one-off scripts and proof-of-concept products where creating a project is overkill.

Ideally what I want is this: I google "gemini api" and that leads me to a page where I can login using my Google account and see the API settings. I create one and start using it right away. No extra wizardry, no multiple packages that must be installed, just the gemini package (no gauth!) and I should be good to go.

replies(3): >>44379074 #>>44379659 #>>44381360 #
11. sitkack ◴[] No.44379074{4}[source]
That will never happen. Just make a scrub project that is your misc-dev-drawer.
12. sachinag ◴[] No.44379659{4}[source]
Totally fair. Yes, Google AI Studio [ https://aistudio.google.com ] lets you do this but Google Cloud doesn't at this time. That's super duper irritating, I know.
13. plaidfuji ◴[] No.44380750[source]
I will say as someone who uses GCP as an enterprise user and AI Studio in personal work, I was also confused about what Google AI Studio actually was at first. I was trying to set up a fork of Open NotebookLM and I just blindly followed Cursor’s guidance on how to get a GOOGLE_API_KEY to run text embedding API calls. Seems that it just created a new project under my personal GCP account, but without billing set up. I think I’ve been successfully getting responses without billing but I don’t know when that will run out.. suppose I’ll get some kind of error response if that happens..

I think I get why AI Studio exists, seems it enables people to prototype AI apps while hiding the complexity of the GCP console, despite the fact that (I assume) most AI Studio api calls are routed through Vertex in some way. Maybe it’s just confusing precisely because I’ve used GCP before.

14. nprateem ◴[] No.44380895[source]
Which would all be fine except some models like Imagen 4 only work on vertex.
15. dieortin ◴[] No.44381360{4}[source]
AFAIK you can very easily get an API key from AI studio without creating any cloud project
replies(2): >>44381452 #>>44385174 #
16. nikcub ◴[] No.44381368{3}[source]
The key to running LLM services in prod is setting up Gemini in Vertex, Anthropic models on AWS Bedrock and OpenAI models on Azure. It's a completely different world in terms of uptime, latency and output performance.
replies(2): >>44383127 #>>44384669 #
17. behnamoh ◴[] No.44381452{5}[source]
read my comment above. G Studio API is limited.
replies(1): >>44383078 #
18. kridsdale3 ◴[] No.44381663{3}[source]
To be fair, no human can do this either.
replies(2): >>44383714 #>>44384948 #
19. happyopossum ◴[] No.44382672[source]
> I think the difference between Vertex and Gemini APIs is that Vertex is meant for existing GCP users and Gemini API for everyone else

Nahh, not really - Vertex has a HUGE feature surface, and can run a ton of models and frameworks. Gemini happens to be one of them, but you could also run non-google LLMs, non LLM stuff, run notebooks against your dataset, manage data flow and storage, and and and…

Gemini is “just” an LLM.

20. sachinag ◴[] No.44383078{6}[source]
Ah I think I see based on the other comment but just to confirm - you want to use Vertex provided Gemini API endpoints without having to create a Google Cloud project. Is that correct? (I’m just trying to get as precise about the problem statement and what success looks like - that helps me figure out a path to the best solution.)

Appreciate the feedback!

replies(1): >>44383845 #
21. shpat ◴[] No.44383127{4}[source]
Have you had any luck getting your Claude quota bumped on Bedrock? I tried working through AWS support but got nowhere. Gave up and used Vertex + Gemini
22. WXLCKNO ◴[] No.44383714{4}[source]
I laughed very hard at this lol.

It's so insanely unintuitive.

23. behnamoh ◴[] No.44383845{7}[source]
Yes! The main pain points I've faced are:

1. There should be no need to create a project to use the Vertex Gemini API. I know Google AI Studio doesn't need a project, but that API is limited compared to Vertex API, which brings me to the next point.

2. There should be one unified API, not two! That'll help scale products with ease. Currently Google recommends using Google AI Studio API for simple projects and one-off scripts, and Vertex for "real" projects. No other competitor does this (look at OpenAI for instance).

3. The OpenAI compatibility layer isn't complete and doesn't support other Gemini features that only the Gemini API supports (e.g,. setting safety level).

4. Devs should need to install only one package to use Google Gemini. Please get rid of gauth.

5. The documentation on Gemini API is fragmented. Ironically, Googling "gemini api doc" doesn't lead to the page that discusses how to get started easily and quickly.

24. vessenes ◴[] No.44384464{3}[source]
Ninjaing in here: Thanks for reading this!

I’m a small time GCP customer for five or six years, and relatively tech competent, and I had a very difficult time getting Gemini code set up yesterday with Vertex API keys; finally I had to use gcloud to login from the CLI in combination with clicking a link and doing web sign on from Gemini. This frustrated me, not least because I have API direct calls to Vertex Gemini working from Aider, although I could not tell you exactly what incantation I finally used to make it work. In particular it didn’t look to me like the Gemini code app uses something like dotenv? I don’t recall now; upshot - could get it to tell me I was logged in wrong / had an oauth2 error / needed a project id at various times, but no inference.

What I wanted: to be able to go to a simple page tied to a google login and generate named API keys that can be used from anywhere to query Gemini models with a SINGLE key and environment variable kept in a .env file. I would prefer to pre-fill the account that debits by API usage. For an example, you could sign up for Anthropic API, OpenAI API, OpenRouter to see their customer flows. They are extremely simple in comparison to getting a new account (or even an old one) in shape to do metered billing for Gemini inference.

I then want this API key to work, regardless of what gcloud “knows” about me — am I logged in to a GCP account? Don’t care. What’s my current “Project?” Don’t care. What’s the difference between Vertex and Gemini? Don’t care.

As I write this, I bet a startup could be launched just offering this as a wrapper. This is surprisingly painful!

Thanks again for all the work; looking forward to seeing more out of Gemini.

replies(1): >>44384795 #
25. com2kid ◴[] No.44384669{4}[source]
Does OpenAI on azure still have that insane latency for content filtering? Last time I checked it added a huge # to time to first token, making azure hosting for real time scenarios impractical.
replies(1): >>44385890 #
26. phonon ◴[] No.44384795{4}[source]
What's wrong with https://aistudio.google.com/app/u/1/apikey ?

https://ai.google.dev/gemini-api/docs/api-key?authuser=1

27. jowea ◴[] No.44384948{4}[source]
ASI test then
28. ctippett ◴[] No.44385174{5}[source]
Creating an API key from AI Studio automatically creates a Google Cloud project in the background for you. You can see it when you're logged into the console or via `gcloud projects list`

It's similar to how a bunch of projects get created whenever you use Apps Scripts.

29. montag ◴[] No.44385783{3}[source]
It's very hard to figure out what resource is incurring charges – and get to a page where you can press "Cancel" on that resource – from the Billing Page. I had to open a support ticket to shut down my Cloud Workstation because I simply couldn't find it in the labyrinth. I gave up and deleted my project.
30. shakna ◴[] No.44385890{5}[source]
Yes.

Unless you convince MS to let you at the "Provisioned Throughput" model. Which also requires being big enough for sales to listen to you.

31. throwaway1550 ◴[] No.44388982[source]
Ex-googler here. Google shipped their org hierarchy here.

Vertex API is managed by Vertex team in Google Cloud. This is a production ready infrastructure that is SRE managed but usually one or two steps from the bleeding edge.

Gemini API, Jules etc are built by Google Labs. This is close to the bleeding edge but not as production ready.