Repository navigation
fix(gemini): response.done lists the output items of the live turn - #47168
Closed
tech-carrement wants to merge 1 commit into
Closed
tech-carrement wants to merge 1 commit into
tech-carrement wants to merge 1 commit into
Conversation
OpenAI's response.done carries the items the response produced; the Gemini Live bridge always sent output: []. Clients that read the function calls or the message items off response.done (instead of collecting every response.output_item.done) saw an empty turn. The bridge now remembers the output_item.done events it emitted since the previous response.done, across frames, and lists them in the next response.done.
Contributor
Merging this PR will not alter performance
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
Author
|
Folding this into one consolidated Gemini Live bridge PR (six commits, one per fix, this one included unchanged) to stay under this account's open-PR cap; link in the next comment. Closing. |
4 of 5 tasks
Contributor
Author
|
Consolidated in #47172. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR
Problem this solves:
response.donelists the items the response produced (output); the Gemini Live bridge always sentoutput: []response.done, instead of collecting everyresponse.output_item.done, saw an empty turnHow it solves it:
response.output_item.doneevents it emitted since the previousresponse.done, across frames, and lists their items in the nextresponse.doneresponse.doneafter a tool call (an existing special case) is untouched: items that follow it are carried to the next realresponse.doneUser Flow
Before: a developer runs a tool-calling turn on
ws://localhost:4000/v1/realtime?model=gemini-liveresponse.output_item.done, then the spoken answerresponse.doneevents carryoutput: []After: the same turn
response.donelists thefunction_callitem, the second lists themessageitemPre-Submission checklist
tests/unitdirectory, Adding at least 1 test is a hard requirementmake test-unitProof of Fix
Live LiteLLM proxy,
vertex_ai/gemini-3.8-liveineu, real calls. Client: aset_usernametool, one user text item ("Je m'appelle Laurent, enregistre mon prénom s'il te plaît.") thenresponse.create; on the function call it answers withfunction_call_outputandresponse.create.Before, merge base
46ae68021e:After, PR tip
63c03de617:The function-call
response.donealready listed its item (built in the tool-call path); the spoken answer'sresponse.donenow lists itsmessageitem instead of[]. Unit test:tests/unit/llms/gemini/realtime/test_gemini_realtime_transformation.py::test_gemini_response_done_lists_the_output_items_of_the_turnType
🐛 Bug Fix
Caveats
Final Attestation