test(e2e): include the first websocket frame in the passthrough realtime assertion - #39925
Closed
yuneng-berri wants to merge 1 commit into
Closed
test(e2e): include the first websocket frame in the passthrough realtime assertion#39925yuneng-berri wants to merge 1 commit into
yuneng-berri wants to merge 1 commit into
Conversation
Contributor
Greptile SummaryThis PR improves the realtime passthrough E2E failure message by retaining a bounded copy of the first websocket frame
Confidence Score: 5/5The PR appears safe to merge and improves E2E failure diagnostics without changing the tested behavior The added field is compatible with every caller, the assertion still requires
|
| Filename | Overview |
|---|---|
| tests/e2e/llm_translation/passthrough_client.py | Adds a compatible optional handshake field and captures a bounded copy of the parsed first websocket frame |
| tests/e2e/llm_translation/test_passthrough_e2e.py | Extends the existing assertion diagnostic without weakening its expected event check |
Reviews (1): Last reviewed commit: "test(e2e): include the first websocket f..." | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
Author
|
Not needed: project-releaser #225 alone makes the test pass (build 263). Diagnostics-only change, dropping it. |
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
Problem this solves:
errorHow it solves it:
User Flow
Before: an engineer triaging a red
litellm-e2erun cannot tell from the log why the realtime upgrade was refusede2e - full suitejob fortests/e2e/llm_translation/test_passthrough_e2e.py::TestOpenAIPassthroughWebsocket::test_realtime_upgrade_reaches_openai_through_the_passthrough_prefixthe first frame was errorandassert 'error' == 'session.created', nothing elseAfter: the same log line names the refusal
the first frame was error: {"type": "error", "error": {"type": "invalid_request_error", "message": "OpenAI websocket passthrough is disabled on this gateway. A proxy admin can turn it on by setting general_settings.enable_openai_websocket_passthrough to true."}}Relevant issues
The failure this surfaced is the one #39841 introduced for the e2e stack, fixed on the stack side in project-releaser
Linear ticket
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
uv run pytest tests/test_litellm/<your_test_file>.py -v. Leave the suites (make test-unit-*,make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more@greptileaito re-request a review after pushing changes)Screenshots / Proof of Fix
Both runs are the
litellm-e2e-prpipeline withE2E_PATHSset to the passthrough file, against an ephemeral stack whose values do not opt into the websocket passthrough, so the test fails on both sides and the only difference is the assertion textBefore (7672399)
e2e - selected testsAfter (0b0ed97)
e2e - selected testsType
✅ Test
Caveats (if any)
Low
QA runbook
openai/gpt-realtime-2deployment andgeneral_settings.enable_openai_websocket_passthroughunset (needs OPENAI_API_KEY)Authorization: Bearer <virtual key>and read the first frameerrorwhose message says the passthrough is disabled on this gatewaygeneral_settings.enable_openai_websocket_passthrough: true, restart, reconnect, and expect the first frame to besession.createdFinal Attestation