mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
fix(auth): hash virtual key before logging on BudgetExceededError
This commit is contained in:
parent
51ba6e39cd
commit
03791c2a00
1 changed files with 2 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
"""
|
||||
Handles Authentication Errors
|
||||
"""
|
||||
from litellm.proxy.utils import hash_token
|
||||
|
||||
from typing import TYPE_CHECKING, Any, Optional, Union
|
||||
|
||||
|
|
@ -115,7 +116,7 @@ class UserAPIKeyAuthExceptionHandler:
|
|||
user_api_key_dict.parent_otel_span = parent_otel_span
|
||||
user_api_key_dict.request_route = route
|
||||
user_api_key_dict.api_key = (
|
||||
user_api_key_dict.api_key or UserAPIKeyAuth(api_key=api_key).api_key
|
||||
user_api_key_dict.api_key or hash_token(api_key) if api_key else None
|
||||
)
|
||||
|
||||
# Stamp identity onto the request's server span now, before the request
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue