-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
feat(proxy): nested model access groups with cycle-safe resolution (#28032) #28075
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
wtfashwin
wants to merge
15
commits into
BerriAI:litellm_internal_staging
Choose a base branch
from
wtfashwin:feat/nested-access-groups
base: litellm_internal_staging
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
e58a561
Merge pull request #27906 from BerriAI/litellm_internal_staging
shin-berri 92729d8
feat(proxy): add LiteLLM_AccessGroupMembership table
wtfashwin d9d0d94
feat(proxy): resolve nested access groups via DFS with cycle detection
wtfashwin f66864c
feat(proxy): wire write path + endpoint integration for nested groups
wtfashwin 9f85fd6
feat(proxy): wire nested group resolution into request-path callers
wtfashwin 88dba54
test(proxy): cover nested access group resolution + validation
wtfashwin e0b843e
refactor(proxy): use on-path tracking in resolve_nested_groups
wtfashwin 96b5ef1
test(proxy): brutal edge-case sweep for nested groups
wtfashwin 2dfe4cc
refactor(proxy): pull shared helpers out, fix PLR0915
wtfashwin 86f5c35
refactor(proxy): convert resolve_nested_groups to iterative DFS
wtfashwin a6139fa
test(proxy): cover async DB helpers for nested access groups
wtfashwin 917b285
fix(proxy): degrade to flat groups when membership table isn't ready
wtfashwin c5e2c6c
fix(proxy): greptile review fixes
wtfashwin ac807e2
fix(proxy): keep nested edges intact on model_ids update
wtfashwin d0951cb
test(proxy): split nested-access-groups test file under size gate
wtfashwin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
.../litellm_proxy_extras/migrations/20260516210000_add_access_group_membership/migration.sql
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| -- CreateTable | ||
| CREATE TABLE IF NOT EXISTS "LiteLLM_AccessGroupMembership" ( | ||
| "id" TEXT NOT NULL, | ||
| "parent_group" TEXT NOT NULL, | ||
| "child_group" TEXT NOT NULL, | ||
| "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
|
|
||
| CONSTRAINT "LiteLLM_AccessGroupMembership_pkey" PRIMARY KEY ("id") | ||
| ); | ||
|
|
||
| -- CreateIndex | ||
| CREATE UNIQUE INDEX IF NOT EXISTS "LiteLLM_AccessGroupMembership_parent_group_child_group_key" ON "LiteLLM_AccessGroupMembership"("parent_group", "child_group"); | ||
|
|
||
| -- CreateIndex | ||
| CREATE INDEX IF NOT EXISTS "LiteLLM_AccessGroupMembership_parent_group_idx" ON "LiteLLM_AccessGroupMembership"("parent_group"); | ||
2 changes: 2 additions & 0 deletions
2
...tras/migrations/20260517100000_index_child_group_on_access_group_membership/migration.sql
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| -- CreateIndex | ||
| CREATE INDEX IF NOT EXISTS "LiteLLM_AccessGroupMembership_child_group_idx" ON "LiteLLM_AccessGroupMembership"("child_group"); |
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.