From 963390928d3be222170178848b20703d8f861391 Mon Sep 17 00:00:00 2001 From: Harshit Jain <48647625+Harshit28j@users.noreply.github.com> Date: Sun, 1 Mar 2026 13:08:40 +0530 Subject: [PATCH] Update litellm/proxy/management_endpoints/jwt_key_mapping_endpoints.py Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- .../proxy/management_endpoints/jwt_key_mapping_endpoints.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/litellm/proxy/management_endpoints/jwt_key_mapping_endpoints.py b/litellm/proxy/management_endpoints/jwt_key_mapping_endpoints.py index 08ca00e66d4..6c19f8c5dd4 100644 --- a/litellm/proxy/management_endpoints/jwt_key_mapping_endpoints.py +++ b/litellm/proxy/management_endpoints/jwt_key_mapping_endpoints.py @@ -55,7 +55,9 @@ async def update_jwt_key_mapping( if prisma_client is None: raise HTTPException(status_code=500, detail="Database not connected") - update_data = data.model_dump(exclude_unset=True, exclude={"id"}) + update_data = data.model_dump(exclude_unset=True, exclude={"id", "key"}) + if data.key is not None: + update_data["token"] = hash_token(data.key) try: # Get old mapping for cache invalidation