fix(openai): continue GPT Live only once every backend call is answered - #2495
Merged
Merged
Conversation
GPT Live refuses response.create with function_call_outputs_required while any function call in the session is unanswered, but the plugin gated each continuation on the one response it tracked per delegation. A call that fell out of that tracking let a continuation go out early, the service refused it, and the backend never answered again. The gate is session-wide: each delegation keeps only the calls of the response still running, confirmed calls wait in one session-wide set, and one response.create goes out when nothing runs, nothing is open and an answer went out since the last continuation. A failed response drops its calls, since the service discards them and refuses their outputs. Ports livekit/agents#7266.
🦋 Changeset detectedLatest commit: b7b3be7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 39 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
davidzhao
approved these changes
Sep 15, 2026
Merged
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.
Problem: GPT Live refuses
response.createwhile any function call in the session is unanswered, but the plugin gated each continuation on one response per delegation. A secondresponse.createdon the same delegation replaced that record, so an earlier call stopped counting, the early continuation was refused, and the backend never answered again.Fix: The gate is session-wide: a delegation holds only the calls of the response still running, and confirmed calls wait in one session-wide set. One
response.creategoes out when nothing runs, nothing is open and an answer went out since the last continuation, and a failed response drops its own calls.Ports livekit/agents#7266.
Context for reviewing and coding agents