Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

Update litellm/proxy/management_endpoints/jwt_key_mapping_endpoints.py

Harshit Jain963390928d3b
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