Skip to content

Vertex AI - gemini-2.5-flash-image-preview intergration #730

@Mat40100

Description

@Mat40100

Hi, while using the vertex platform, i want to use the gemini-2.5-flash-image-preview.

So i add it to the catalog, add the different capabilities, (set up the google cloud adc..).

When i want to fetch the result, the only way for me to get the image binary is to use the getRawResult method of the reponse.

In fact in Bridge/VertexAi/Gemini/ResultConverter.php::128 (convertChoice) cannot handle inline_data response as content part and cant return BinaryResult.

I managed to make it work easily adding the case

if (isset($contentPart['inlineData'])) {
    return new BinaryResult($contentPart['inlineData']['data'], $contentPart['inlineData']['mimeType'] ?? null);
}

and adding BinaryResult as function return type.

See you, thanks for the work

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions