M_K
August 22, 2025, 12:12pm
7
I just found this post and a few others. It looks like I am having the same issue with 2.5 Pro, good to know it’s not just me, bad to know it’s an issue Gemini I have posted here , looks like the same issue Gemini 2.5 Pro - Empty Response-Status 200
There are also these related links:
It was working fine until 2 hours ago. Again the same issue empty responses like last week, it started happening again.
I got successful responses a couple of times before with the same prompt. However, it’s now returning empty responses, and these are the finish_reason and safety_ratings from the usage_metadata:
Finish Reason: STOP. Safety Ratings: N/A
Therefore, it doesn’t seem to be a problem with max tokens, nor safety reasons.
I already implemented retry with exponential backoff, rotating among different prefixes in my prompt according to a solution suggested here, but nothing is working.
Would apprecia…
This thread:
Running Gemini 2.5 Pro with grounded search sometimes returns empty response.text with finish_reason of STOP and no other reason. When I inspect the response dict it shows evidence of the search with some web meta information, but nothing else.
Any ideas on what is going on?
Here is my code:
def get_response(seed, model, system_prompt, user_prompt):
api_key = os.environ.get('GEMINI_API_KEY')
google_search_tool = Tool(
google_search=GoogleSearch()
)
response = None
…