r/googlecloud • • 23h ago

Billing Google charged me $5,230 for Gemini and won't tell me what it was for

0 Upvotes

My English isn't very good, so I used AI to help me write this. Please bear with me.

I've been using Google Cloud for years.

From May 2 to June 27 this year, my project was billed for gemini-3.1-pro every single day, 57 days in a row, and it kept going up. Total: $5,230.12. I don't use that model.

I told Google (through my reseller, I'm in Taiwan, and I got a real shock when the reseller's bill came) that I want to know where my money went. If there were that many Gemini calls, show me what the requests and prompts actually were.

Here's what I got instead from Google Cloud billing support (they reply in Chinese, these are my translations):

  • They refused to show me the requests. Their reason: the Gemini API runs on AI Studio and only uses Google Cloud for billing, so the billing team has limited access and can't provide the details. (Then why is Google Cloud the one billing me? It can charge me, but it isn't responsible for checking whether the charges are real?)
  • They told me to check the AI Studio logs. Later they said those only exist if logging was turned on before it happened. It wasn't, so there's nothing.
  • My dispute was rejected 3 times (July 8, July 15, Aug 25) with no reason. The last one just said their internal engineering team "determined the usage does not meet the conditions for a billing adjustment".
  • When I asked why, they said an internal team makes the decision and they themselves "cannot know the specific criteria or reasons" for approval or rejection.

So I'm being asked to pay $5,230, and Google Cloud billing support refuses to show me a single request or even tell me why I was rejected.

Then it turned into a loop. Billing support told me, twice, to go ask on the Google AI developer forum. On the forum, a moderator replied with a template about closed accounts and prepayment refunds (neither is my case) and told me to contact billing support.

Other things I tried:

  • Registered letter to Google's Taiwan office. They said they can't handle it.
  • Formal letter to Google's legal team, then a follow-up. Only an auto-reply so far.

Before anyone says "talk to your reseller": they've been great and filed the support cases with Google for me. The answers still come from the same billing team.

And yes, I know the first question will be "did you leak your key?" Honestly, I don't know. That's exactly why I'm asking for the logs.

It's been 5 months. I'm worn out and I don't know where else to go. This might be small money for a lot of people, but for me it's a really big hit. Sometimes I put a lot of work into building a whole website and only get paid NT$5,000 for it (less than $200 USD).

TL;DR: Got billed $5,230 for a Gemini model I don't use. I want to see what I'm paying for. Google Cloud billing support refused to show me the requests. I was rejected 3 times with no reason, and billing support and the forum keep sending me to each other.

Has anyone actually gotten Google to show them the request logs? If you're billed through a reseller and got past billing support, what worked? Any advice, or an upvote so someone at Google sees this, would mean a lot.

If anyone at Google sees this: case numbers 72705455 / 74566968 / 75417009. I'll be in the comments.

Thank you all so much for taking the time to read this.


r/googlecloud • • 16h ago

GKE Pattern for giving AI coding agents keyless GCP & Vertex AI access (WIF gotchas, loopback metadata server, and verifying trust conditions)

0 Upvotes

When teams give AI coding agents access to GCP (gcloud, Terraform, Python SDKs, or Vertex AI), most setups still drop a static service account JSON key or mount a broad developer gcloud config into the workspace. If a prompt injection or transcript leak happens, that key lives until someone notices and rotates it.

Here are the four GCP-specific lessons we hit building keyless agent access with Workload Identity Federation (WIF):

  1. **Test WIF trust conditions against fabricated identities before saving**

- It's very easy to misconfigure a Workload Identity Pool attribute condition so it trusts too broadly (e.g., another org or another resource from the same OIDC issuer).

- During connection verification, we actively probe Google STS with 3 fabricated identities (another connection in the same org, another org's connection, and an environment subject) and refuse to save the connection unless Google rejects all three. That catches overly broad WIF bindings before a single token is minted.

2. **GCP impersonation tokens don't downscope like AWS STS session policies**

- Unlike AWS AssumeRole (which takes an inline session policy to intersect permissions), GCP service account impersonation tokens inherit *all* roles of the target service account — Credential Access Boundaries only downscope Cloud Storage, not general GCP IAM.

- Our fix: bind multiple narrow, task-specific service accounts (up to 20 per WIF connection) and let org/project access profiles expose only a subset of those accounts to each agent, with 10-60 min token lifetimes.

3. **Two subtle gotchas delivering tokens inside a microVM with zero key files on disk**

- We run a loopback GCE metadata server inside the environment backed by an out-of-band unix socket so the OIDC signing key never enters the VM.

- **Gotcha A (Python SDKs):** Setting only `GCE_METADATA_HOST` isn't enough for Google's Python client libraries — you also need `GCE_METADATA_IP` set, or they skip the loopback server and fail to find credentials.

- **Gotcha B (gcloud multi-account):** `gcloud` only queries a metadata server for the default account's token even when `--account` or `CLOUDSDK_CORE_ACCOUNT` is set. We had to wrap `gcloud` with a lightweight shim that pulls the token for the requested account from the socket directly (plus a wrapper command that spins up a per-command loopback metadata server for Terraform and SDKs acting as a non-default account).

4. **Use keyless Vertex AI WIF to keep ZDR and CMEK intact**

- Routing coding agent inference through Vertex AI via WIF (service account with `roles/aiplatform.user`, zero static API keys) keeps model calls inside your GCP project under your own ZDR, residency, and CMEK controls instead of a tool vendor's org.

Honest caveat: a prompt-injected agent can still do whatever the narrow service account is allowed to do while the token is valid (10-60 min), so narrow SA design and Cloud Audit Logs monitoring still matter.

Disclosure: I'm building kosem (kosem.ai), where we run Kata microVMs on GKE Standard (nested virtualization) and built this GCP WIF + Vertex AI integration. Full 5-layer defense-in-depth write-up here if helpful: https://kosem.ai/blog/defense-in-depth-for-coding-agents

Curious how other GCP shops are isolating coding agents from broad developer gcloud profiles and static SA keys.


r/googlecloud • • 9h ago

Anyone with Colab Pro able to connect G4?

Thumbnail reddit.com
2 Upvotes

r/googlecloud • • 16h ago

Google cloud skills boost challenge (learn with communities) swags

1 Upvotes

I recently completed this challenge from google cloud and as the last date for this challenge was on 23 rd November and that date had already passed away but I still haven’t received any update from them regarding the swag claims. Is there anyone who also completed and received a mail regarding this or someone who already completed last year and knows about it?? Please let me know as there are not responding to mails now

NOTE: The event was not hosted by geeks for geeks (i did from google developer group as I received invitation from them)