Skip to content

[VertexAI] GenerateContentCandidate.parts is undefined #9014

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
dlarocque opened this issue May 12, 2025 · 0 comments
Open

[VertexAI] GenerateContentCandidate.parts is undefined #9014

dlarocque opened this issue May 12, 2025 · 0 comments
Assignees

Comments

@dlarocque
Copy link
Contributor

Operating System

n/a

Environment (if applicable)

n/a

Firebase SDK Version

11.7.1

Firebase SDK Product(s)

VertexAI

Project Tooling

JS

Detailed Problem Description

When using multimodal content generation with Gemini and streaming responses, the last chunk returned will have no parts, which causes an internal error.

There is currently no workaround for this issue.

Steps and code to reproduce issue

const model = getGenerativeModel(ai, { model: 'gemini-2.0-flash-exp', generationConfig: { responseModalities: ['TEXT', 'IMAGE'] }});
model.generateContentStream('generate an image of a dog'); // @firebase/vertexai: FirebaseError: AI: Part should have at least one property, but there are none. This is likely caused by a malformed response from the backend. (AI/invalid-content)
@dlarocque dlarocque self-assigned this May 12, 2025
@dlarocque dlarocque added bug new A new issue that hasn't be categoirzed as question, bug or feature request api: vertexai labels May 12, 2025
@jbalidiong jbalidiong removed the new A new issue that hasn't be categoirzed as question, bug or feature request label May 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants