Repository navigation
test: take keys out of the legacy proxy, enterprise and mcp unit tests before moving them - #42901
Merged
Merged
Conversation
…list and coverage upload on failure
… synthetic values and integration and e2e coverage
…d wire the gemini pass-through split
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
|
devin-ai-integration
Bot
force-pushed
the
litellm_ci_mig_1_ci_fix
branch
from
September 24, 2026 08:27
bac5f58 to
8f84ef6
Compare
devin-ai-integration
Bot
force-pushed
the
litellm_ci_mig_2_key_cleanup
branch
from
September 24, 2026 08:27
4b0e503 to
d2054d6
Compare
Contributor
Contributor
yuneng-berri
approved these changes
Sep 24, 2026
devin-ai-integration Bot
added a commit
that referenced
this pull request
Sep 24, 2026
…s before moving them (#42901) * ci: fix the litellm-tests unit job with sysmon coverage, an env allowlist and coverage upload on failure * test: replace key-dependent proxy, enterprise and mcp unit tests with synthetic values and integration and e2e coverage * test: drop key reads at the legacy proxy, enterprise and mcp paths and wire the gemini pass-through split * ci: fail the unit shard when circleci tests split errors * test: drop restating comments from the gemini pass-through split * ci: exit the unit shard cleanly when circleci tests split assigns it no files --------- Co-authored-by: yuneng <yuneng@berri.ai>
This branch is waiting to be deployed
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.
Stack 2/5 of the split of #42831 (reference PR, stays open until the stack lands). Below: #42900. Above: #42902. Carved from
litellm_ci_migration_proxy_miscat c17f440 withgit checkout <branch> -- <paths>, no rewritesTLDR
Problem this solves:
test_proxy_pass_user_config.py::test_chat_completionneeds Azure/OpenAI keys and fails keylesstest_vertex_ai_gemini_token_counting_with_contentsis unconditionally skipped, never runsHow it solves it:
tests/integration/routing/test_user_config_routing.pyreplaces the unit test; unit file deletedcontentstoken counter test becomestests/e2e/llm_translation/test_token_counter_gemini_contents_e2e.pyload_vertex_ai_credentialsand the credential imports dropped fromtest_proxy_token_counter.pytest_proxy_utils.py,test_prometheus_unit_tests.py,test_proxy_custom_auth.pytest_gemini_pass_through_endpointsplit totest_proxy_server_gemini_pass_through.py, legacy selector line addedtests/mcp_tests/test_aresponses_api_with_mcp_providers.pyEverything stays at its legacy path. The moves happen in stacks 3 to 5
Type
🧹 Refactoring
✅ Test
Screenshots / Proof of Fix
litellm-testson this head: https://app.circleci.com/pipelines/github/BerriAI/litellm/90271The routing integration test boots an owned proxy with
general_settings.allow_client_side_credentials: trueagainst a scripted local upstream, sends a chat completion with auser_configpointing at that upstream with a user-supplied key, and asserts exactly one/v1/chat/completionsreached the upstream withAuthorization: Bearer <user key>. The second case boots without the opt-in and asserts 401. It is selected by theprovidersgroup throughroutinginrun.pyGROUPSand passes locally underrun_integration.sh(real Postgres and Redis, no provider keys)The Gemini e2e test runs through
e2e-changed-tests(.github/workflows/test-e2e-changed.yml,select_tests.pypicks changedtests/e2e/**/test_*.py) once thee2e-changedenvironment is approved. Locally it passed forgemini-2.5-flashandgemini-2.5-flash-vertexthrough/utils/token_counteragainst real credentialsGreptile follow-up in d2054d6: the two restating comments in
test_proxy_server_gemini_pass_through.pyare goneCaveats (if any)
Low
test_proxy_token_counter.pyhas two failures inherited from main (test_factory_gpt4_endpoint_does_not_call_anthropic_counter,test_internal_token_counter_anthropic_provider_detection), reproduced on the base tree, untouched hereQA runbook
contentsthrough/utils/token_counter?call_endpoint=trueis counted by Google's countTokens upstream for both the Gemini and Vertex deployments (needsGEMINI_API_KEYand Vertex credentials){"model": "gemini-2.5-flash", "contents": [{"parts": [{"text": "hello world"}]}]}request_modelechoing the model,total_tokens> 0 equal tooriginal_response.totalTokens, and everypromptTokensDetails[].tokenCount> 0gemini-2.5-flash-vertex, expect the same shapePre-Submission checklist
Final Attestation
Link to Devin session: https://app.devin.ai/sessions/d541aba7e5844703bab65085ef2d54b2
Open in Devin Desktop: https://app.devin.ai/desktop/session/d541aba7e5844703bab65085ef2d54b2?variant=devin