fix: handle panic in gemini responses stream - #723
Merged
akshaydeo merged 1 commit intoOct 31, 2025
Conversation
Contributor
📝 WalkthroughSummary by CodeRabbit
WalkthroughAdded a request type indicator to streaming response metadata and reorganized the switch case evaluation order for streaming chunk handling in the bifrost HTTP transport layer without altering functional behavior. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
TejasGhatte
marked this pull request as ready for review
October 31, 2025 03:49
akshaydeo
deleted the
10-31-fix_handle_panic_in_gemini_responses_stream
branch
October 31, 2025 04:00
akshaydeo
added a commit
that referenced
this pull request
Nov 17, 2025
…_responses_stream fix: handle panic in gemini responses stream
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
Fix the request type assignment in responses stream and prioritize responses stream handling over chat responses in the streaming handler.
Closes #721
Changes
RequestTypeassignment inToBifrostResponsesStreamResponse()to properly set the request type toResponsesStreamRequesthandleStreaming()to check forBifrostResponsesStreamResponsebeforeBifrostChatResponseto ensure proper handling priorityType of change
Affected areas
How to test
Test streaming responses to verify the correct handling order:
Breaking changes
Related issues
Fixes an issue where responses stream requests were not properly identified and could be incorrectly handled as chat responses.
Security considerations
No security implications.
Checklist
docs/contributing/README.mdand followed the guidelines