Category: Google AI Studio / Bug
Description:
Many developers on paid Prepay and Tier 1/2 accounts are experiencing a persistent platform bug where submitting any prompt in the Google AI Studio web UI instantly triggers “An internal error has occurred” and “Failed to generate content.”
After HAR analysis and network diagnostics, I have isolated the exact root cause:
Technical Root Cause
When a paid API key is selected in the AI Studio web interface, the frontend application client injects custom headers (such as x-aistudio-quota-tier, x-aistudio-user-api-key, x-aistudio-visit-id, and x-goog-ext-5197338..-bin) into XHR requests destined for the internal gRPC-Web proxy (alkalimakersuite-pa.clients6.google.com).
Google’s Edge Server Frontend (ESF) has not whitelisted these new x-aistudio-* headers in the Access-Control-Allow-Headers configuration for alkalimakersuite-pa. Consequently:
- The browser’s CORS
OPTIONSpreflight request is rejected byESFwith anHTTP 403 Forbiddenresponse. - Chrome immediately aborts the actual
POSTrequest (net::ERR_FAILED, status code 0). - The AI Studio web client catches this aborted RPC and displays the generic internal error banner.
Proof & Verification
- Web UI Fails:
OPTIONSpreflights toalkalimakersuite-pa.clients6.google.comlisting thex-aistudio-*headers returnHTTP 403. - Preflight Succeeds When Stripped: An identical
OPTIONSpreflight without thex-aistudio-*headers returnsHTTP 200 OK. - Direct API Works: Direct REST API requests to
generativelanguage.googleapis.com/v1beta/models/...using the exact same API keys and project credentials succeed withHTTP 200 OK, proving that the GCP projects, billing ledgers, and API keys are fully functional.
Request to Engineering
Please update the CORS preflight header whitelist on alkalimakersuite-pa.clients6.google.com to accept the x-aistudio-* auxiliary headers introduced in recent frontend builds, or roll back the header injection for paid web playground sessions.
Thank you!