Skip to content

fix(openai): handle incomplete Responses events - #7024

Merged
chenghao-mou merged 1 commit into
livekit:mainfrom
dawNotPoi:fix/7013-responses-incomplete
Aug 28, 2026
Merged

fix(openai): handle incomplete Responses events#7024
chenghao-mou merged 1 commit into
livekit:mainfrom
dawNotPoi:fix/7013-responses-incomplete

Conversation

@dawNotPoi

Copy link
Copy Markdown
Contributor

Summary

  • treat response.incomplete as a terminal Responses WebSocket event
  • parse the SDK event and surface its reason as a non-retryable provider error for both HTTP and WebSocket streams
  • add hermetic regression coverage for transport termination, retry behavior, and response-context preservation

Fixes #7013

Testing

  • uv run pytest tests/test_plugin_openai_responses.py --plugin openai -q
  • uv run ruff format --check livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/responses/llm.py tests/test_plugin_openai_responses.py
  • uv run ruff check livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/responses/llm.py tests/test_plugin_openai_responses.py
  • uv run mypy --platform linux -p livekit.plugins.openai
  • git diff --check

@CLAassistant

CLAassistant commented Aug 28, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@dawNotPoi
dawNotPoi marked this pull request as ready for review August 28, 2026 09:38
@dawNotPoi
dawNotPoi requested a review from a team as a code owner August 28, 2026 09:38

@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

@gabriele-dialpad

Copy link
Copy Markdown

Thanks for fixing this!

@chenghao-mou chenghao-mou left a comment

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.

thanks for the PR!

@chenghao-mou
chenghao-mou merged commit cdb37ad into livekit:main Aug 28, 2026
18 checks passed
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.

OpenAI Responses WebSocket hangs after response.incomplete terminal event

4 participants