Remix.run Logo
Maxious 11 hours ago

> The Gemini API supports monthly spend caps at both the billing account tier and project levels. These controls are designed to protect your account from unexpected overages, and the ecosystem to ensure service availability

https://ai.google.dev/gemini-api/docs/billing#project-spend-...

rtkwe 11 hours ago | parent | next [-]

The problem is it's specific to that API and defaults to uncapped so people who aren't using it and haven't heard about the issues with the Firebase API keys probably won't have set them.

isoldex 10 hours ago | parent | next [-]

Spend caps exist for Gemini (Maxious linked them) - they just default to OFF. For an API that can bill four figures per hour, opt-in safety by default isn't a UX choice, it's a billing strategy

zozbot234 11 hours ago | parent | prev [-]

Except that Google's own statements are extremely clear that "leaked" (i.e. public) API keys should not be able to access the Gemini API in the first place: "We have identified a vulnerability where some API keys may have been publicly exposed. To protect your data and prevent unauthorized access, we have proactively blocked these known leaked keys from accessing the Gemini API. ... We are defaulting to blocking API keys that are leaked and used with the Gemini API, helping prevent abuse of cost and your application data." https://ai.google.dev/gemini-api/docs/troubleshooting#google...

For extra clarity on the exact so-called "vulnerability" that Google identified, see: https://news.ycombinator.com/item?id=47156925 This describes the very issue where some API keys were public by design (used for client-side web access), so the term "leaked" should be read in that unusually broad sense. Firebase keys are obviously covered, since they're also public by design.

(As for "Firebase AI Logic", it is explicitly very different: it's supposed to be implemented via a proxy service so the Gemini API key is never seen by the client: https://firebase.google.com/docs/ai-logic Clearly, just casually "enabling" something - which is what OP says they did! - should never result in abuse of cost on the scale OP describes.)

sillysaurusx 11 hours ago | parent [-]

There are other vectors, e.g. a compromised GCP key leading to $13k in Gemini charges (posted 3 days ago) https://www.reddit.com/r/googlecloud/comments/1sjzat3/api_ke...

whywhywhywhy 11 hours ago | parent | prev [-]

Why is the default uncapped then other than the hopes of billing people who screw up or get exploited.

logankilpatrick 10 hours ago | parent | next [-]

We have a bunch of different protections in place, every account has a billing account cap by default (see: https://ai.google.dev/gemini-api/docs/billing#tier-spend-cap...), in the addition to the ability to set more granular developer spend caps.

drfloyd51 11 hours ago | parent | prev [-]

See also: Why is the default cap so low? I lost €78bojillion because my API stopped working.

Barbing 10 hours ago | parent | next [-]

Demand on-call phone numbers, autodial the entire company when it looks like they’re about to lose their first bojillion.

No, you don't really have to give Google a bunch of phone numbers. The input box will also accept entry of the following text:

“I'm a big stupid idiot, and when my API stops working, which it will, it will be all my fault and not Google's.”

jamespo 10 hours ago | parent | prev [-]

Monitoring could pick this up in minutes rather than how long this took to discover