revert: undo teamless all-team-models denial from #32022 and #29746 (#32032) [backport 1.90.x] - #32378
Draft
devin-ai-integration[bot] wants to merge 2 commits into
Draft
revert: undo teamless all-team-models denial from #32022 and #29746 (#32032) [backport 1.90.x]#32378devin-ai-integration[bot] wants to merge 2 commits into
devin-ai-integration[bot] wants to merge 2 commits into
Conversation
…32032) Backport of #32032 to stable/1.90.x. Cherry-picked from 5ece78f (litellm_internal_staging). Scoped to the teamless all-team-models regression fix; staging-only test coverage (team-sentinel expansion, wildcard deployment expansion) that depends on changes not present on this line was omitted. 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>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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.
Relevant issues
Backports #32032 to
stable/1.90.x. Original issue #30737Linear ticket
Pre-Submission checklist
Screenshots / Proof of Fix
This is a backport of the already-merged revert #32032; the end-to-end proof of fix (live proxy, teamless
all-team-modelskey both listing and calling models) is covered by the source change and the dedicated e2e test in #32372. Here the guarantee is the hardened unit regression tests, which I mutation-tested against this branch: restoring either teamless denial (the_resolve_key_models_for_auth_checkteamless branch returning the sentinel list, or theget_key_modelsteam_id is not Noneguard) makestest_resolve_key_models_teamless_all_team_models_returns_emptyandtest_get_key_models_teamless_all_team_models_returns_unrestrictedfail. The full auth + batch suites pass (219 passed) on this branchType
🐛 Bug Fix
✅ Test
Changes
A teamless key scoped to
all-team-modelsmust inherit the full proxy model list, exactly as if its models field were left empty; that is the intended contract per #30737. #29746 tightened this to deny such keys, and #32022 mirrored the denial on the inference path. Both were reverted on staging in #32032. This backports that revert tostable/1.90.xThe behavioral change is confined to two spots.
_resolve_key_models_for_auth_checknow returns[](unrestricted) instead of the unresolved sentinel list for a teamlessall-team-modelskey, andget_key_modelsdrops theteam_id is not Noneguard so the sentinel expands the same way regardless of team assignment. The inference skip check inuser_api_key_auth.pyalready lacked the guard on this line, so it needed no changeScope note: the source revert also carried staging-only test coverage (team-sentinel expansion for
can_team_access_model, andexpand_wildcard_deployments_for_model_infocases) that depends on code paths not present onstable/1.90.x. Those were omitted since they exercise behavior this line doesn't have; the ported tests are the ones that pin the teamless regression itselfVersion bumped to 1.90.4 in its own commit
Link to Devin session: https://app.devin.ai/sessions/68804be8677b4a0c9033e7c2663281bc
Requested by: @mateo-berri