Even I thought something wrong with my prompts, and was doing all sorts of modifications. Then realized it was Gemini issue.
Iām also having the same issue . I was trying to use the Gemini API to diarize a transcript from a mp3 file.
I thought it was because I was doing concurrent API calls that exceeded the free tier limit . But I reduced it and Iām still dealing with this problem
Sometimes I recieve a response and it works , sometimes it doesnāt and its empty .
I guess thereās an issue with the API
I have the same issue as well. I wasted so many tokens just to get repeated empty responses. Will billing be refunded for the lost token due to this bug?
I am extracting pdf content using gemini 2.5 pro, and I have the same issue using, the issue didnāt occur before, but now occurs everytime almost, switching to gemini 2.5 flash, it works fine, but it is not a solution for me because the pro version is more stable than the flash version
Hey, try sending the request again when it fails with empty response or error codes 500x, but with adding a unique random ID to the start of your prompt, like request-id-xyz123. You donāt need a long delay, just a second or two is fine, just be mindful of the modelās rate limits. This seems to force Gemini to treat it as a brand new request and it usually goes through on the second or third try. Itās not a perfect fix, but it has made the Pro model usable for me again. Hope it helps you too.
Nah. Doesnāt work. Wasted time doing this. Once in a while people post this solution, it never works.
Yea i saw it. By the way, I havenāt encountered this issue for the last few days, even though I havenāt changed anything in my code or configuration. My server is the same as well. My theory is that they have both healthy and faulty model instances, and it seems my requests are now being routed to a healthy one. Fingers crossed
Iāve encountered the same issue, experiencing very frequent empty responses today. After an empty response, retrying multiple times still results in empty replies. Additionally, some requests today occasionally return incomplete content.
I have the same issue with 2.5 Flash / Python SDK.
Well, I spoke too soon. It seems my healthy instance theory didnāt last long.
Just tried another complex Map-Reduce job, and itās back to the same old story.
On top of that, Iām observing a some kind of degradation in the quality of the successful responses I do get. The modelās adherence to the detailed instructions in my prompt seems less strict than it was. It would be great if the team could look into this as well.
[0] [Map-Reduce] MAP phase: processing 9 context chunks...
[0] - Processing chunk 1/9...
[0] [AIManager] Requesting answer from model: gemini-2.5-pro
[0] [AIManager] Successfully received answer from gemini-2.5-pro on attempt 1.
[0] - Processing chunk 2/9...
[0] [AIManager] Requesting answer from model: gemini-2.5-pro
[0] [AIManager] Successfully received answer from gemini-2.5-pro on attempt 1.
[0] - Processing chunk 3/9...
[0] [AIManager] Requesting answer from model: gemini-2.5-pro
[0] [GeminiApiService] API call failed for model gemini-2.5-pro: [GeminiApiService] Received an empty but valid response structure for model gemini-2.5-pro.
[0] [AIManager] Retryable error for gemini-2.5-pro: [GeminiApiService] Received an empty but valid response structure for model gemini-2.5-pro.. Retrying... (1/15). Waiting 500ms.
[0] [RATE-LIMITER] Limit (TPM). Waiting: 3346ms.
[0] [GeminiApiService] API call failed for model gemini-2.5-pro: [GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro:generateContent: [500 Internal Server Error] An internal error has occurred. Please retry or report in https://developers.generativeai.google/guide/troubleshooting
[0] [AIManager] Retryable error for gemini-2.5-pro: [GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro:generateContent: [500 Internal Server Error] An internal error has occurred. Please retry or report in https://developers.generativeai.google/guide/troubleshooting. Retrying... (2/15). Waiting 500ms.
[0] [DB] Cleaned up 13 old rate limit event records.
[0] [RATE-LIMITER] Limit (TPM). Waiting: 45468ms.
[0] [AIManager] Successfully received answer from gemini-2.5-pro on attempt 3.
[0] - Processing chunk 4/9...
[0] [AIManager] Requesting answer from model: gemini-2.5-pro
[0] [AIManager] Successfully received answer from gemini-2.5-pro on attempt 1.
[0] - Processing chunk 5/9...
[0] [AIManager] Requesting answer from model: gemini-2.5-pro
[0] [GeminiApiService] API call failed for model gemini-2.5-pro: [GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro:generateContent: [500 Internal Server Error] An internal error has occurred. Please retry or report in https://developers.generativeai.google/guide/troubleshooting
[0] [AIManager] Retryable error for gemini-2.5-pro: [GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro:generateContent: [500 Internal Server Error] An internal error has occurred. Please retry or report in https://developers.generativeai.google/guide/troubleshooting. Retrying... (1/15). Waiting 500ms.
[0] [RATE-LIMITER] Limit (TPM). Waiting: 1238ms.
[0] [GeminiApiService] API call failed for model gemini-2.5-pro: [GeminiApiService] Received an empty but valid response structure for model gemini-2.5-pro.
[0] [AIManager] Retryable error for gemini-2.5-pro: [GeminiApiService] Received an empty but valid response structure for model gemini-2.5-pro.. Retrying... (2/15). Waiting 500ms.
[0] [RATE-LIMITER] Limit (TPM). Waiting: 38497ms.
[0] [AIManager] Successfully received answer from gemini-2.5-pro on attempt 3.
[0] - Processing chunk 6/9...
[0] [AIManager] Requesting answer from model: gemini-2.5-pro
[0] [GeminiApiService] API call failed for model gemini-2.5-pro: [GeminiApiService] Received an empty but valid response structure for model gemini-2.5-pro.
[0] [AIManager] Retryable error for gemini-2.5-pro: [GeminiApiService] Received an empty but valid response structure for model gemini-2.5-pro.. Retrying... (1/15). Waiting 500ms.
[0] [DB] Cleaned up 7 old rate limit event records.
[0] [AIManager] Successfully received answer from gemini-2.5-pro on attempt 2.
[0] - Processing chunk 7/9...
[0] [AIManager] Requesting answer from model: gemini-2.5-pro
[0] [GeminiApiService] API call failed for model gemini-2.5-pro: [GeminiApiService] Received an empty but valid response structure for model gemini-2.5-pro.
[0] [AIManager] Retryable error for gemini-2.5-pro: [GeminiApiService] Received an empty but valid response structure for model gemini-2.5-pro.. Retrying... (1/15). Waiting 500ms.
[0] [GeminiApiService] API call failed for model gemini-2.5-pro: [GeminiApiService] Received an empty but valid response structure for model gemini-2.5-pro.
[0] [AIManager] Retryable error for gemini-2.5-pro: [GeminiApiService] Received an empty but valid response structure for model gemini-2.5-pro.. Retrying... (2/15). Waiting 500ms.
[0] [RATE-LIMITER] Limit (TPM). Waiting: 48379ms.
[0] [GeminiApiService] API call failed for model gemini-2.5-pro: [GeminiApiService] Received an empty but valid response structure for model gemini-2.5-pro.
[0] [AIManager] Retryable error for gemini-2.5-pro: [GeminiApiService] Received an empty but valid response structure for model gemini-2.5-pro.. Retrying... (3/15). Waiting 500ms.
[0] [GeminiApiService] API call failed for model gemini-2.5-pro: [GeminiApiService] Received an empty but valid response structure for model gemini-2.5-pro.
[0] [AIManager] Retryable error for gemini-2.5-pro: [GeminiApiService] Received an empty but valid response structure for model gemini-2.5-pro.. Retrying... (4/15). Waiting 500ms.
[0] [RATE-LIMITER] Limit (TPM). Waiting: 35930ms.
[0] [GeminiApiService] API call failed for model gemini-2.5-pro: [GeminiApiService] Received an empty but valid response structure for model gemini-2.5-pro.
[0] [AIManager] Retryable error for gemini-2.5-pro: [GeminiApiService] Received an empty but valid response structure for model gemini-2.5-pro.. Retrying... (5/15). Waiting 500ms.
[0] [RATE-LIMITER] Limit (TPM). Waiting: 9717ms.
[0] [AIManager] Successfully received answer from gemini-2.5-pro on attempt 6.
[0] - Processing chunk 8/9...
[0] [AIManager] Requesting answer from model: gemini-2.5-pro
[0] [GeminiApiService] API call failed for model gemini-2.5-pro: [GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro:generateContent: [500 Internal Server Error] An internal error has occurred. Please retry or report in https://developers.generativeai.google/guide/troubleshooting
[0] [AIManager] Retryable error for gemini-2.5-pro: [GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro:generateContent: [500 Internal Server Error] An internal error has occurred. Please retry or report in https://developers.generativeai.google/guide/troubleshooting. Retrying... (1/15). Waiting 500ms.
[0] [GeminiApiService] API call failed for model gemini-2.5-pro: [GeminiApiService] Received an empty but valid response structure for model gemini-2.5-pro.
[0] [AIManager] Retryable error for gemini-2.5-pro: [GeminiApiService] Received an empty but valid response structure for model gemini-2.5-pro.. Retrying... (2/15). Waiting 500ms.
[0] [RATE-LIMITER] Limit (TPM). Waiting: 49561ms.
[0] [DB] Cleaned up 9 old rate limit event records.
[0] [GeminiApiService] API call failed for model gemini-2.5-pro: [GeminiApiService] Received an empty but valid response structure for model gemini-2.5-pro.
[0] [AIManager] Retryable error for gemini-2.5-pro: [GeminiApiService] Received an empty but valid response structure for model gemini-2.5-pro.. Retrying... (3/15). Waiting 500ms.
[0] [GeminiApiService] API call failed for model gemini-2.5-pro: [GeminiApiService] Received an empty but valid response structure for model gemini-2.5-pro.
[0] [AIManager] Retryable error for gemini-2.5-pro: [GeminiApiService] Received an empty but valid response structure for model gemini-2.5-pro.. Retrying... (4/15). Waiting 500ms.
[0] [RATE-LIMITER] Limit (TPM). Waiting: 46890ms.
[0] [GeminiApiService] API call failed for model gemini-2.5-pro: [GeminiApiService] Received an empty but valid response structure for model gemini-2.5-pro.
[0] [AIManager] Retryable error for gemini-2.5-pro: [GeminiApiService] Received an empty but valid response structure for model gemini-2.5-pro.. Retrying... (5/15). Waiting 500ms.
[0] [RATE-LIMITER] Limit (TPM). Waiting: 2096ms.
[0] [AIManager] Successfully received answer from gemini-2.5-pro on attempt 6.
[0] - Processing chunk 9/9...
[0] [AIManager] Requesting answer from model: gemini-2.5-pro
[0] [GeminiApiService] API call failed for model gemini-2.5-pro: [GeminiApiService] Received an empty but valid response structure for model gemini-2.5-pro.
[0] [AIManager] Retryable error for gemini-2.5-pro: [GeminiApiService] Received an empty but valid response structure for model gemini-2.5-pro.. Retrying... (1/15). Waiting 500ms.
[0] [GeminiApiService] API call failed for model gemini-2.5-pro: [GeminiApiService] Received an empty but valid response structure for model gemini-2.5-pro.
[0] [AIManager] Retryable error for gemini-2.5-pro: [GeminiApiService] Received an empty but valid response structure for model gemini-2.5-pro.. Retrying... (2/15). Waiting 500ms.
[0] [AIManager] Successfully received answer from gemini-2.5-pro on attempt 3.
[0] [Map-Reduce] REDUCE phase: synthesizing final answer from partials...
[0] [AIManager] Requesting answer from model: gemini-2.5-pro
[0] [AIManager] Successfully received answer from gemini-2.5-pro on attempt 1.
Same here, last week everything was fine, I canāt see the problem
It wonāt be helpful for a long automated process
Hi community, if you read this thread and youāre facing this issue with Gemini 2.5 please like this thread or leave a reply. It is very important as we need to get the Google Engineering team to put this on their top priority list. Tnx
itās insane how they still havenāt fixed this issue after the forum is literally filled only with posts about exactly the same issue
Hey folks, flagging to the team! Sorry for the delay here, this was a bit of a known issue from the latest 2.5 Pro model launch, but it seems like something has changed recently so getting eyes on this asap.
This issue is not account based
Running into issues as well; sometimes the internal reasoning the model produces does not even make any sense compared to what my prompt says. Frustratingly, on the AI Studio, everything seems to work fine with the same generation parameters and prompt.
Thanks Logan You Are The Best
Iām having the same problem with different prompts and inputs. If it could help the engineering team resolve the issue, Iād be happy to privately send a prompt and input example. The problem occurs with both the 2.5 Pro and 2.5 Flash.
EDIT:
If it helps, the last day it worked perfectly for me was the 10th of this month at 12:13 GMT +2 (78 API calls and 470k input tokens without any problems).
It is happening to me too since yesterday actually! I had to cancel my customer demos today and I have an important demo in 4 hours. How should I use this in production when outages like this happen since months ![]()