mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-22 00:31:44 +00:00
perf(auth): early-return mock in user_api_key_auth for perf isolation
Skip _read_request_body and _user_api_key_auth_builder; return mock UserAPIKeyAuth for minimal-path latency measurement.
This commit is contained in:
parent
c0fa7f0e20
commit
91fa9de529
1 changed files with 7 additions and 0 deletions
|
|
@ -1274,6 +1274,13 @@ async def user_api_key_auth(
|
|||
"""
|
||||
Parent function to authenticate user api key / jwt token.
|
||||
"""
|
||||
# Perf isolation: early return mock – skip _read_request_body, _user_api_key_auth_builder
|
||||
route = get_request_route(request=request)
|
||||
return UserAPIKeyAuth(
|
||||
api_key=api_key or "",
|
||||
user_role=LitellmUserRoles.INTERNAL_USER,
|
||||
request_route=normalize_request_route(route),
|
||||
)
|
||||
|
||||
request_data = await _read_request_body(request=request)
|
||||
request_data = populate_request_with_path_params(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue