Gemini 2.5 Flash Failing on Cold Starts

Hello,

I encountered this issue about 10 days ago, using an Angular app with Vertex AI to call gemini-2.5-flash:
const vertexAI = getAI(this.firebaseApp);
this.model = getGenerativeModel(vertexAI, {
model: “gemini-2.5-flash”,
systemInstruction: systemInstruction,
tools: [productsToolSet],
});

I’m wondering if anyone else is experiencing it, and if Google is aware of it and working on a fix. Thanks in advance.

Expected Behavior:
The model should successfully process all tool calls on a cold start, regardless of the function’s parameters or return type, and return a 200 OK status.

-Scenario A (Fails): Tool returns a complex object

  1. Configure a chat session using the gemini-2.5-flash model.
  2. Define a tool with no parameters that returns a complex object, such as getUsers, which returns User array object.
  3. On a cold start, send a prompt to trigger this tool (e.g., “list users”).
  4. Result: The API call fails with a 500 Internal Server Error.

-Scenario B (Succeeds): Tool returns a primitive type

  1. Configure a chat session using the gemini-2.5-flash model.
  2. Define a tool with no parameters that returns a primitive type, such as displayCart, which returns a string.
  3. On a cold start, send a simple text prompt (e.g., “Hello”) to warm up the model.
  4. Send a second prompt to trigger the “displayCart” tool (e.g., “list cart”).
  5. Result: The API call succeeds with a 200 OK status.

Additional Information:
This bug is specific to the gemini-2.5-flash model. The issue is not reproducible with the gemini-2.0-flash-001 model.
Attached screenshot shows the 500 error from the console.

1 Like

Hello,

Welcome to the Forum!!

500 error is a temparary error and it should resolve itself after time. You mentioned you observed this issue 10 days ago, I hope it is working fine now.

1 Like

Thanks for your comments. I’ve actually been experiencing this issue for the past 10 days. This morning, I’m still encountering 500 errors during cold starts with ‘gemini-2.5-flash’. I also tried the new model, ‘gemini-2.5-flash-lite’, and it had the same issue on cold starts.

1 Like