Gemini API with 2.5 flash model no longer supports PDFs with empty page or pages

I’m using https://generativelanguage.googleapis.com/v1beta endpoint with gemini-2.5-flash model. I’m seeing a degradation when I pass a pdf with multiple pages where one page is empty and other pages have content, the API is now returning 200 status code with an empty response. I’m pretty sure this was previously working as I’ve been using this model for some time. I’m passing the document data as inline base64.
For documents with only empty pages, the API was returning an error status code with error message “The document has no pages.” previously but is now returning an empty response as well. Also the response contains “promptFeedback”=>{“blockReason”=>“OTHER”} which is the generic category for any kind of errors. This issue is not happening when I use gemini-3-flash-preview.

Will this be fixed for gemini-2.5-flash or are we being forced to upgrade to gemini-3-flash-preview?

1 Like