Skip to content

[Platform][Gemini] Response with multiple content parts ends up with an error #1053

@chr-hertel

Description

@chr-hertel

While working on #1054 I ran into the issue that those image models might generate a response with two content parts: 1 text part and one inlineData part - which is not handled well currently and makes that added example flaky - especially with gemini-2.5-flash-image.

Use the example gemini/image-editing.php for reproduction and this method is to fix:
Symfony\AI\Platform\Bridge\Gemini\Gemini\ResultConverter::convertChoice, see TODO comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingPlatformIssues & PRs about the AI Platform componentStatus: Needs Review

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions