mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-11 03:38:38 +00:00
Merge 7ab97c7ed4 into 4b398ef6d4
This commit is contained in:
commit
e1f491cb3a
1 changed files with 2 additions and 2 deletions
|
|
@ -1,6 +1,7 @@
|
|||
"""
|
||||
Handles Authentication Errors
|
||||
"""
|
||||
from litellm.proxy.utils import _safe_hash_litellm_api_key
|
||||
|
||||
from typing import TYPE_CHECKING, Any, Optional, Union
|
||||
|
||||
|
|
@ -115,9 +116,8 @@ 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 (_safe_hash_litellm_api_key(api_key) if api_key else None)
|
||||
)
|
||||
|
||||
# Stamp identity onto the request's server span now, before the request
|
||||
# is rejected; the OTEL failure hooks don't touch the server span, so
|
||||
# without this the failed trace would carry no team/key attributes.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue