Open
Description
Operating System
Windows
Environment (if applicable)
Chrome
Firebase SDK Version
11.9.1
Firebase SDK Product(s)
AI
Project Tooling
Angular
Detailed Problem Description
I ran into this error once when sending a request to Gemini 2.5 Pro via generateContentStream
:
Error sending prompt to AI: TypeError: Cannot read properties of undefined (reading 'some')
Perhaps candidate.content?.parts.some(
should be candidate.content?.parts?.some(
.
Steps and code to reproduce issue
Most requests don't seem to run into this issue, but one request did.
Replacing parts.some
with parts?.some
in googleai-mappers.ts should resolve the issue.