Repository navigation
test(proxy): move management_endpoints, management_helpers and guardrails tests into tests/unit/proxy - #44003
Merged
Merged
Conversation
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Contributor
Author
|
@greptileai review |
devin-ai-integration
Bot
force-pushed
the
litellm_migrate_proxy_tests_p3
branch
from
October 1, 2026 10:05
14dca9b to
b50be42
Compare
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_migrate_proxy_tests_p2
branch
from
October 1, 2026 10:34
502b0c4 to
b25ab90
Compare
devin-ai-integration
Bot
force-pushed
the
litellm_migrate_proxy_tests_p3
branch
from
October 1, 2026 10:47
b50be42 to
b9a3758
Compare
1 task done
devin-ai-integration
Bot
force-pushed
the
litellm_migrate_proxy_tests_p3
branch
from
October 1, 2026 11:08
6a6617c to
9a27bd5
Compare
Contributor
Author
|
@greptileai review |
Contributor
Author
|
@greptileai review |
…sts/unit/proxy Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…e HTTP boundary Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
devin-ai-integration
Bot
force-pushed
the
litellm_migrate_proxy_tests_p2
branch
from
October 1, 2026 16:28
676ca84 to
b20d053
Compare
…ails tests into tests/unit/proxy Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…tests Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
… test Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…ning test Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
devin-ai-integration
Bot
force-pushed
the
litellm_migrate_proxy_tests_p3
branch
from
October 1, 2026 16:33
a240878 to
2f9fda7
Compare
Contributor
Author
|
@greptileai review |
yuneng-berri
approved these changes
Oct 1, 2026
Merged
4 of 6 tasks
ninadphalak
pushed a commit
to ninadphalak/litellm
that referenced
this pull request
Oct 2, 2026
Upstream BerriAI#44003 moved tests/test_litellm/proxy/guardrails into tests/unit/proxy/guardrails, so test_llm_shield_proxy.py moves with it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019np8KSjHecLkLNLrJZxXaj
ninadphalak
pushed a commit
to ninadphalak/litellm
that referenced
this pull request
Oct 2, 2026
Upstream BerriAI#44003 moved tests/test_litellm/proxy/guardrails into tests/unit/proxy/guardrails, so test_llm_shield_proxy.py moves with it.
ninadphalak
added a commit
to ninadphalak/litellm
that referenced
this pull request
Oct 2, 2026
Upstream BerriAI#44003 moved tests/test_litellm/proxy/guardrails into tests/unit/proxy/guardrails, so test_llm_shield_proxy.py moves with it.
5 of 7 tasks
3 of 30 tasks
4 of 6 tasks
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.
TLDR
Problem this solves:
tests/test_litellm/proxystill holds the management_endpoints, management_helpers and guardrails teststests/unit/proxy/<same path>How it solves it:
git mvof all three directories (165 files, every one a pure rename, no name collisions)proxy-endpointsshard paths intest-unit.yml, shard name unchangedpyproject.toml, nothing else in that filePR 3 of 7, stacked on #43998
Screenshots / Proof of Fix
Coverage ledger
Same
ledger.pyas #43998, baseorigin/litellm_migrate_proxy_tests_p2Runs
The
proxy-endpointsshard command restricted to the moved dirs,env -iwith outbound sockets blocked,-n 4:8647 passed, 7 skipped, 1 xfailed. The four pre-existing destination files thattest-unit-proxy-db.ymlowns, run once on their own:95 passed, 81 skipped.assert_ci_coverage.pyin both modes prints OK and is unchangedNon-rename edits
management_endpoints/policy_endpoints/test_ai_policy_suggester.py/responsesnow answers it through the sharedhttpx_transportfixture, so theAuthenticationErrordiscriminator is unchangedmanagement_endpoints/test_ui_sso.py{"value": []}now serves itmanagement_endpoints/test_internal_user_endpoints.pyjwt_key_mapping_doublesimport path. Main's #44007 already injects the HIBP client into the breached-password test, so it needs no stub heremanagement_endpoints/test_team_endpoints.py,test_organization_endpoints.py,management_v1/test_users.py,management_v1/test_teams.py,guardrails/guardrail_hooks/test_cisco_ai_defense_chat.py,test_cisco_ai_defense_mcp.pytests.test_litellm.proxy.*helper imports and docstring paths now point attests.unit.proxy.*guardrails/guardrail_hooks/test_straiker.pytiktoken.encoding_for_model, which downloads BPE files fromopenaipublic.blob.core.windows.net. It now gets a real local byte-leveltiktoken.Encoding, served only fortext-davinci-003through aMappingProxyTypelookup, so any other model raisesKeyError. Mutatingstraiker.py:490toencoding_for_model("gpt-4o")turns it redtests/test_litellm/test_conftest.pytests/unit/proxy/management_endpoints/__init__.pytests/unit/test_package_layout.pypassesmanagement_helpers/test_team_metadata_validation.pyimport team_metadata_validator_implsis now package-qualified since the moved dir is a package.github/workflows/test-unit.ymlproxy-endpointsruns the three new dirs and ignores the 4 destination filestest-unit-proxy-db.ymlalready owns, so each file runs in exactly one GHA shardpyproject.tomltests_dirand--ignore=.../test_saml_sso.pystringsMakefiletest-unit-proxy-guardrailspathstests/test_models.py,tests/test_team_members.py.circleci/scripts/unit_selection.shis unchanged: the moved files fall into theunitcatch-all and the four proxy-db files keep their existing entriesType
✅ Test
Final Attestation
Link to Devin session: https://app.devin.ai/sessions/d9bda95617da464e88d3619765819d0e
Open in Devin Desktop: https://app.devin.ai/desktop/session/d9bda95617da464e88d3619765819d0e?variant=devin