Skip to content

[AI] Replace function role is replace by user for gemini 3.5 - #1871

Merged
paulb777 merged 1 commit into
mainfrom
paulb777-patch-1
Sep 14, 2026
Merged

paulb777 merged 1 commit into
mainfrom
paulb777-patch-1

Conversation

@paulb777

Copy link
Copy Markdown
Member

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request changes the role for function responses from "function" to "user" in both streaming and non-streaming chat message calls within FunctionCallingViewModel.swift. Feedback indicates that this change violates the Gemini API contract, which requires function responses to be sent with the "function" (or "tool") role, and suggests reverting these changes to prevent API validation errors.

@andrewheard andrewheard left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For additional context, firebase/firebase-ios-sdk#16478.

@paulb777
paulb777 merged commit c619807 into main Sep 14, 2026
18 checks passed
@paulb777
paulb777 deleted the paulb777-patch-1 branch September 14, 2026 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants