All AI Studio apps (Preview + Shared links) fail with 400 INVALID_ARGUMENT on every Gemini call, even minimal requests

Hi everyone,

Since the evening of October 16, 2026 (around [19:36] UTC+7), every Gemini API call made from my AI Studio Build apps fails with 400 INVALID_ARGUMENT. This happens both in the Preview panel and when users open the apps through Shared links (aistudio.google.com/apps/``...). The apps had been working normally until then, and I did not change any code before it started.

Scope

  • This affects all of my AI Studio apps that use this mechanism, not just one. They have different codebases.
  • It fails with every model I tried, including stable ones such as gemini-2.5-pro and gemini-2.5-flash.
  • The apps are client-side React apps using @google/genai through the AI Studio proxy (metadata.json has MAJOR_CAPABILITY_SERVER_SIDE_GEMINI_API).

Error

[Agent PPCT] Model gemini-2.5-pro lỗi: {"error":{"code":400,"message":"Request contains an invalid argument.","status":"INVALID_ARGUMENT"}}

In the console (from _aistudio-iframe.js):

Failed to call the Gemini API: Request contains an invalid argument.

Minimal request that fails
This is a plain-text request with no images, no system instruction and no config:

const ai = new GoogleGenAI({ apiKey: process.env.API_KEY });
await ai.models.generateContent({
  model: "gemini-2.5-pro",
  contents: [{ role: "user", parts: [{ text: "..." }] }]
});

generateContentStream with temperature, systemInstruction and maxOutputTokens fails the same way.

What I already ruled out

  • SDK version: pinning @google/genai in the importmap from ^1.32.0 to exactly 1.46.0 made no difference.
  • Request format: the request above already uses the standard { role, parts } structure.
  • Model names: stable, existing models fail too.
  • App-specific code: unrelated apps broke at the same moment.

Because even a minimal, well-formed request is rejected in every app at once, this looks like a problem in the AI Studio proxy or backend, not in app code.

Is anyone else seeing this? Could the AI Studio team please take a look?

Thanks!

Hi @Th_y_Giao_Tin this should be fixed now and your app should be working as expected. Let us know if you still see this issue.