Skip to content

fix(openai): ignore incomplete and duplicate GPT Live backend tool calls - #7230

Open
kiwijuicer wants to merge 1 commit into
livekit:mainfrom
kiwijuicer:norbert/fix-gpt-live-function-dispatch
Open

fix(openai): ignore incomplete and duplicate GPT Live backend tool calls#7230
kiwijuicer wants to merge 1 commit into
livekit:mainfrom
kiwijuicer:norbert/fix-gpt-live-function-dispatch

Conversation

@kiwijuicer

Copy link
Copy Markdown

A wrapped Responses response.output_item.done event does not establish that its function-call item completed. GPT Live currently emits the call even when its status is incomplete, and emits a second call when the same completed item is delivered again.

Declare the output item's optional status, require completed before recording or dispatching a function call, and use the current response's existing call-ID set to suppress duplicate dispatch. Deduplication stays scoped to the tracked response; this does not claim exactly-once execution across reconnects or responses.

Regression coverage includes missing/null/incomplete/in-progress/failed status, a later completed event, duplicate calls, distinct calls, and response continuation after all results arrive. The GPT Live and duplex adapter suites pass (103 tests), as does make check.

@kiwijuicer
kiwijuicer requested a review from a team as a code owner September 11, 2026 13:14

@devin-ai-integration devin-ai-integration 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

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.

1 participant