Skip to content

(gemini live 3.1): fix tool responses#5413

Merged
tinalenguyen merged 6 commits intomainfrom
tina/refactor-gemini-rt
Apr 11, 2026
Merged

(gemini live 3.1): fix tool responses#5413
tinalenguyen merged 6 commits intomainfrom
tina/refactor-gemini-rt

Conversation

@tinalenguyen
Copy link
Copy Markdown
Member

@tinalenguyen tinalenguyen commented Apr 11, 2026

send tool results without touching send_client_content for gemini 3.1 via capabiltiies.mutable_* guards. also remove shutdown model (source)

verified via survey agent and these models:
"gemini-live-2.5-flash-native-audio"
"gemini-3.1-flash-live-preview"
"gemini-2.5-flash-native-audio-preview-12-2025"

thank you to @leonobitech and @FMFigueroa for providing the context to this issue πŸ˜„

@chenghao-mou chenghao-mou requested a review from a team April 11, 2026 01:25
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@FMFigueroa
Copy link
Copy Markdown

Hey @tinalenguyen, reviewed #5413 β€” much better approach. Keeping the fix scoped to the plugin instead of touching core makes sense, especially with multiple providers depending on a stable base. The mutable_chat_context gate is clean. Happy to close my PR in favor of this one.

Copy link
Copy Markdown
Member

@davidzhao davidzhao left a comment

Choose a reason for hiding this comment

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

lgtm

)
if turns:
self._send_client_event(types.LiveClientContent(turns=turns, turn_complete=False))
if self._realtime_model.capabilities.mutable_chat_context:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

should we log a warning if it's not mutable?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

i added a warning here in the init, could be kinda noisy in update_chat_ctx

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

got it, that makes sense

@tinalenguyen tinalenguyen merged commit 3e51d8e into main Apr 11, 2026
25 of 27 checks passed
@tinalenguyen tinalenguyen deleted the tina/refactor-gemini-rt branch April 11, 2026 05:15
leonobitech pushed a commit to leonobitech/backend that referenced this pull request Apr 14, 2026
πŸ”„ Update livekit-agents dependency from @fix/gemini-3.1-tool-response to @main
πŸ”„ Update livekit-plugins-google dependency from @fix/gemini-3.1-tool-response to @main
βœ… Fix merged upstream via livekit/agents#5413

πŸš€ Powered by Claude Opus 4.6
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