Skip to content

Improve empty choices handling in streaming chunks#131

Merged
seratch merged 1 commit intoseratch:mainfrom
PeterDaveHello:improve-streaming-empty-choices
Dec 14, 2025
Merged

Improve empty choices handling in streaming chunks#131
seratch merged 1 commit intoseratch:mainfrom
PeterDaveHello:improve-streaming-empty-choices

Conversation

@PeterDaveHello
Copy link
Contributor

GitHub Copilot summary:

This pull request improves the robustness of the streaming reply handler in app/openai_ops.py by updating how chunks without choices are handled. Instead of only checking for Azure-specific empty chunks, the code now gracefully skips any chunk missing choices, logging a debug message for easier troubleshooting.

Streaming robustness improvements:

  • Updated the chunk handling logic in consume_openai_stream_to_write_reply to skip and log any stream chunk that is missing choices, not just those from Azure, improving compatibility and debuggability.

Copy link
Owner

@seratch seratch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@seratch seratch merged commit 0abdb57 into seratch:main Dec 14, 2025
7 checks passed
@PeterDaveHello PeterDaveHello deleted the improve-streaming-empty-choices branch December 14, 2025 09:37
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.

2 participants