Repository navigation
fix(proxy): backport #34266 to stable/1.93.x for ad hoc release - #34372
mateo-berri wants to merge 1 commit into
Conversation
Greptile SummaryThis backport changes team-cache refresh behavior to prevent stale allowlists after team updates
Confidence Score: 3/5The alias-cache invalidations should be made independent before merging so one cache backend failure cannot leave outdated team permissions active A synchronous Redis deletion failure is caught, but because both invalidations share the same try block it prevents cleanup of the separate internal cache that alias authentication reads first litellm/proxy/auth/auth_checks.py
|
| Filename | Overview |
|---|---|
| litellm/proxy/auth/auth_checks.py | Adds internal team-cache invalidation, but couples two alias-cache deletions so one backend failure can leave stale authorization state |
| litellm/proxy/auth/user_api_key_auth.py | Removes a redundant and potentially stale team-object writeback from the authentication path |
| tests/test_litellm/proxy/auth/test_auth_checks.py | Adds regression coverage for cache ordering and backend failures, but does not cover partial failure between the two alias-cache invalidations |
| tests/test_litellm/proxy/auth/test_user_api_key_auth.py | Verifies that authentication fallback objects are not persisted into the canonical team cache |
| tests/test_litellm/proxy/management_endpoints/test_team_endpoints.py | Updates the team endpoint test fixture for the newly invoked internal-cache invalidation |
Reviews (1): Last reviewed commit: "fix(proxy): stop serving stale team mode..." | Re-trigger Greptile
| try: | ||
| user_api_key_cache.delete_cache(key=alias_key) | ||
| if proxy_logging_obj is not None: | ||
| await proxy_logging_obj.internal_usage_cache.dual_cache.async_delete_cache(key=alias_key) |
There was a problem hiding this comment.
Alias invalidation stops early
When the synchronous Redis deletion from user_api_key_cache fails during a team update, the shared exception handler skips deletion from the independently owned internal usage cache, causing alias-authenticated requests to continue using outdated team model permissions until that entry expires
Rule Used: What: Fail any PR which may contains a security in... (source)
Knowledge Base Used:
|
🚅 Hi, thanks for the PR! I'm Agent Shin, the automated triage bot for this repository. What's this and why am I getting it? I read the description against our contribution rubric. Here's how it lined up: What you got right:
What's still missing:
If the description isn't updated in the next 24 hours, I'll auto-close this PR. That's not us saying we don't care about the change; we want the open-PR list to mirror what a maintainer can act on right now, so contributors don't get lost in a backlog. A closed PR is a soft "park this for later," not a rejection. Take your time; everything below still works after the close. During the grace period: just update the PR description with the missing pieces. No need to ping me; I'll re-check on the next sweep and skip the auto-close if it now passes. See what counts as QA proof for the full rubric (a linked issue alone isn't enough; it covers context, not proof). If the PR does get auto-closed in 24 hours, you still have easy recovery paths:
Internal BerriAI contributors: this rubric doesn't apply to you; ping a maintainer. (I'm an LLM, so I'm not infallible. If you think I got this wrong, ping a maintainer; they'll override me.) |
|
Closing as abandoned since it has had no commits or human comments in over 30 days. Reopen it if it is still needed |
Ad hoc release branch: identical to
v1.93.0plus one fix.Included
/team/updateNotes
litellm_internal_staging) ontostable/1.93.x, applied from PR head098cb5dd9712897a6d2da370ceda3c7c280d3a8d. If review changes fix(proxy): stop serving stale team model allowlist after /team/update #34266 before it merges, this branch must be refreshed to match.stable/1.93.xwas created at thev1.93.0tag (052b5a2169) to host this line.pyproject.tomlstays at1.93.0; the ad hoc release version is derived at dispatch time by the release orchestrator.v1.93.0(staging-only tests around the deletedtest_auth_path_caches_team_object_under_canonical_team_id_key) resolved to the PR's exact semantic change: one test added, one deleted.tests/test_litellm/proxy/auth/(290 passed) andtests/test_litellm/proxy/management_endpoints/test_team_endpoints.py(194 passed) on this branch.litellm_internal_stagingseparately so>=1.94keeps the fix.