Repository navigation
Conversation
Contributor
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
agustin18
force-pushed
the
fix/websearch-converted-stream-responses-500
branch
from
September 26, 2026 07:21
8b33cbe to
259821f
Compare
agustin18
force-pushed
the
fix/websearch-converted-stream-responses-500
branch
from
October 18, 2026 01:53
259821f to
6482c4e
Compare
…handler Signed-off-by: agustin18 <agustinsaiz02@gmail.com>
Signed-off-by: agustin18 <agustinsaiz02@gmail.com>
Contributor
|
Thanks for the contribution! I'm closing this because #45433 already fixed it on main, so streamed web search on bridged deployments returns 200 now |
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.
TLDR
When an interception callback (e.g.
websearch_interception,code_interpreter_interception,headroom_interception) forcesstream=Falseon/v1/responsesto run the agentic loop, and the model routes to the chat completions bridge (use_chat_completions_api: True), the bridge was returning a plain non-async-iterableResponsesAPIResponseinstead of re-wrapping it as a synthetic event stream. This resulted in an immediate 500 when the proxy attemptedasync forover the response.This PR re-wraps the completed
ResponsesAPIResponseintoMockResponsesAPIStreamingIteratorwhenconverted_stream_requested(kwargs)is set on the bridge path, mirroring the native responses path inllm_http_handler.py.Relevant issues
Fixes #42770
Pre-Submission checklist
pytest tests/test_litellm/responses/litellm_completion_transformation/test_handler.py -k wraps_converted_stream)Type
🐛 Bug Fix
✅ Test
Final Attestation