-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[Fix] SCIM - Add SCIM PATCH and PUT Ops for Users #11863
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for SCIM PATCH and PUT operations for users, refactors team membership handling into shared utilities, and includes new tests for the patch functionality.
- Added unit tests covering field replacement and group membership changes in
patch_user
- Made
userName
andname
fields optional in SCIM user models to support partial updates - Updated SCIM transformation logic to handle both
Member
instances and dicts when serializing team members
Reviewed Changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated no comments.
File | Description |
---|---|
tests/test_litellm/proxy/management_endpoints/scim/test_scim_patch_user.py | New async tests for patch_user covering field updates and group ops |
litellm/types/proxy/management_endpoints/scim_v2.py | Changed SCIMUserName and SCIMUser fields to be optional |
litellm/proxy/management_endpoints/scim/scim_transformations.py | Added handling for dict-based Member objects in SCIM conversion |
Comments suppressed due to low confidence (3)
tests/test_litellm/proxy/management_endpoints/scim/test_scim_patch_user.py:102
- It would strengthen this test to also assert that
mock_db.litellm_usertable.update
is called after group membership changes to ensure the updated team list is persisted.
assert mock_add_fn.called
litellm/types/proxy/management_endpoints/scim_v2.py:46
- [nitpick] Since
userName
andname
are now optional, consider updating the class docstring or relevant API documentation to clarify when these fields may beNone
and how downstream consumers should handle their absence.
userName: Optional[str] = None
litellm/proxy/management_endpoints/scim/scim_transformations.py:127
- The
Member
class is referenced here but not imported in this module, which will raise aNameError
at runtime. Please add the appropriate import forMember
at the top of the file.
if isinstance(member, dict):
[Fix] SCIM - Add SCIM PATCH and PUT Ops for Users
Relevant issues
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
tests/litellm/
directory, Adding at least 1 test is a hard requirement - see detailsmake test-unit
Type
🐛 Bug Fix
🧹 Refactoring
✅ Test
Changes