fix(ci): let the E2E proxy accept the mock testing params its suite sends - #35511
Merged
yuneng-berri merged 1 commit intoAug 1, 2026
Merged
Conversation
…ends Gating the mock testing request params behind general_settings.dangerously_allow_mock_testing_request_params (#35423) turned every fallback, retry and timeout drill in tests/test_fallbacks.py into a 400: the build_and_test job mounts proxy_server_config.yaml, which never opted in. Opt that config in. It is the config the CI proxy runs with, and the suite it serves exists to drive synthetic failures. Add a unit test that ties the two together: it scans the top-level tests/test_*.py files build_and_test globs for gated param names and fails if the config they run against has not opted in, so the next change to either side is caught in a fast lint-tier job rather than a Docker E2E.
Contributor
Greptile SummaryThe PR enables gated mock-testing request parameters in the proxy configuration used by the E2E fallback suite and adds a unit-level regression check coupling that suite to its configuration.
Confidence Score: 5/5The PR appears safe to merge, with the configuration change scoped to confirmed testing stacks and covered by a focused regression check. The changed CI proxy configuration now permits the synthetic parameters exercised by the fallback suite, while the added test ensures the required opt-in is not removed while those parameters remain in use.
|
| Filename | Overview |
|---|---|
| proxy_server_config.yaml | Enables test-only mock request parameters for the CI and hardened QA proxy stacks that consume this configuration. |
| tests/test_litellm/proxy/test_route_llm_request.py | Adds a regression test ensuring the top-level E2E suite's gated mock parameters remain compatible with its mounted proxy configuration. |
Reviews (1): Last reviewed commit: "fix(ci): let the E2E proxy accept the mo..." | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
tin-berri
approved these changes
Aug 1, 2026
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:
build_and_testis red ontests/test_fallbacks.pyHow it solves it:
proxy_server_config.yamlinto the gate's config flagRelevant issues
Follow-up to #35423, which gated the six mock testing request params behind
general_settings.dangerously_allow_mock_testing_request_params. The gate itself is correct; this only wires up the CI proxy that the E2E fallback suite drives.Linear ticket
Pre-Submission checklist
@greptileaito re-request a review after pushing changes)Screenshots / Proof of Fix
The
build_and_testjob runs the top-leveltests/test_*.pysuite against a proxy container mounted withproxy_server_config.yaml, alongsidetests/_fake_openai_endpoint_server.pyon port 8190. I reproduced that shape locally: the fake OpenAI endpoint on 8191, an isolated Postgres, and a proxy on 4011 carrying the model entries the five affected tests use. Two honest caveats about the local stand-in. My.envhas noOPENAI_API_KEY, sogpt-3.5-turboandgpt-instructare backed byanthropic/claude-sonnet-5andanthropic/claude-haiku-4-5instead; the successful fallback below is a real, paid Anthropic call. Andfake-openai-endpoint-4/fake-openai-endpoint-5point at the same canned endpoint CI uses, because the timeout and retry drills assert on synthetic failures that by design never reach a provider.Each block below names the test whose assertion it stands in for.
Before, at
b1fd20f4cd(branch point, config unmodified):That maps 1:1 onto the two failures reported from CI.
test_chat_completion_client_fallbacks[True]raisesRequest did not return a 200 status code: 400, andtest_chat_completion_with_timeoutgets nox-litellm-timeoutheader on the 400 and dies withKeyError: 'x-litellm-timeout'. The[False]parametrization is unaffected either way: the key's model ACL is checked before the mock gate, so it still fails for the reason it is meant to.After, at
86312da3be:The
[True]case is served byclaude-haiku-4-5, the fallback deployment, which is the point: the primary was made to fail synthetically and the fallback answered for real.To rerun it yourself, start the canned endpoint and a proxy carrying those five models, then:
Type
🚄 Infrastructure
Changes
proxy_server_config.yamlgetsgeneral_settings.dangerously_allow_mock_testing_request_params: true. That is the config thebuild_and_testproxy container runs with, and the suite it serves exists to drive synthetic failures through the router, so the opt-in belongs there.One consequence worth naming:
docker-compose.hardened.ymlmounts the same file, so that local stack now accepts mock testing params too. It is a build-and-QA stack rather than a deployment template, and it shares the file precisely because it is the CI config, but a reviewer who would rather keep the word "hardened" absolute can say so and I will split it onto its own config.The new test in
tests/test_litellm/proxy/test_route_llm_request.pyscans the top-leveltests/test_*.pyfiles thatbuild_and_testglobs for any ofGATED_MOCK_PARAM_NAMES, then asserts the config those tests run against has opted in. It fails with the offending param names listed, and it is red on the parent commit and green on this one. The value is the turnaround: this gap currently surfaces only after a Docker image build and a full E2E job, and now it surfaces in the unit tier.Final Attestation