mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
fix: document team_member rate limit fix as pure bug fix (no flag needed)
Add detailed comment explaining this is parity with JWT auth flow (#13601), not a new behaviour change, so no backwards-compat flag is required. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
c122c6c18a
commit
dc6a39eacb
1 changed files with 10 additions and 3 deletions
|
|
@ -1169,9 +1169,16 @@ async def _user_api_key_auth_builder( # noqa: PLR0915
|
|||
valid_token
|
||||
) # updating it here, allows all downstream reporting / checks to use the updated budget
|
||||
|
||||
# Populate team_member_rpm_limit / team_member_tpm_limit for Virtual Key auth.
|
||||
# JWT auth flow already gets this from JWTAuthManager.auth_builder(),
|
||||
# but Virtual Key flow never queries team membership. Fix that here.
|
||||
# Bug fix: Populate team_member_rpm_limit / team_member_tpm_limit for Virtual Key auth.
|
||||
#
|
||||
# This is a pure bug fix, not a behaviour change. The JWT auth flow already
|
||||
# enforces per-member rate limits via JWTAuthManager.auth_builder() (see #13601).
|
||||
# The Virtual Key flow was simply missing the equivalent query, causing
|
||||
# team_member_rpm_limit / team_member_tpm_limit to be silently ignored for
|
||||
# all virtual-key requests. Operators who configured per-member limits
|
||||
# always expected them to be enforced; this restores parity between the
|
||||
# two auth paths. No flag is needed because the previous behaviour
|
||||
# (limits not enforced) was unintentional.
|
||||
if (
|
||||
valid_token.user_id is not None
|
||||
and valid_token.team_id is not None
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue