Skip to content

Updating to gemini 2.5 flash I get a GenerateContentResponse error #168

@ruggiero-m

Description

@ruggiero-m

Hi, I noticed that since I upgraded to gemini 2.5 flash (gemini-2.5-flash) I sometimes get these errors that I didn't have before with gemini 2.0, do you have any idea what it could be?

The GenerateContentResponse::parts() quick accessor only works for a single candidate,but none were returned. Check the GenerateContentResponse::$promptFeedback to see if the prompt was blocked.

The GenerateContentResponse::text() quick accessor only works when the response contains a valid Part, but none was returned. Check the candidate.safety_ratings to see if the response was blocked.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions