feat: expose turnComplete for live content - #1381
Open
YuqiGuo105 wants to merge 1 commit into
Open
Conversation
YuqiGuo105
marked this pull request as ready for review
July 28, 2026 18:15
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.
Summary
turnCompleteon queued Live content requestsLiveRequestQueue.content(Content, boolean)while preserving the existing default behaviorBaseLlmFlowandBaseLlmConnectionLiveSendClientContentParametersfalse, and JSON round-trip behaviorMotivation
Gemini Live supports sending multiple content messages as one user turn. A caller can send intermediate content with
turnComplete=false, then mark the final content withturnComplete=true.ADK Java did not expose this capability.
LiveRequesthad no turn-completion field,BaseLlmFlowcalled onlysendContent(Content), andGeminiLlmConnectionalways setturnComplete(true). As a result, applications could not append content to an open Live turn without asking the model to process a completed turn.Implementation
LiveRequestnow carries an optionalturnCompletevalue.LiveRequestQueueprovides an additive overload:The existing method remains equivalent to
content(content, true), so current callers keep the same behavior.BaseLlmConnectionadds a defaultsendContent(Content, boolean)overload that delegates to the original method. This allows existing custom connection implementations to continue compiling and running.GeminiLlmConnectionoverrides the overload and forwards the value to the lower-level Live API.Pure
FunctionResponsecontent continues to use the existing tool-response path; the new flag applies to normal client content.User impact
Applications can now send multiple content messages within one Live user turn:
Existing
requestQueue.content(content)calls remain unchanged.Validation
./mvnw -pl core -Dtest=LiveRequestQueueTest test./mvnw testCloses #1200.