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 Jain0e2dd4aac1a7
diff --git a/litellm/proxy/management_endpoints/jwt_key_mapping_endpoints.py b/litellm/proxy/management_endpoints/jwt_key_mapping_endpoints.py
index 770b9a48dd5..9680a92ae67 100644
--- a/litellm/proxy/management_endpoints/jwt_key_mapping_endpoints.py
+++ b/litellm/proxy/management_endpoints/jwt_key_mapping_endpoints.py
@@ -22,12 +22,13 @@ async def create_jwt_key_mapping(
raise HTTPException(status_code=500, detail="Database not connected")
try:
- hashed_key = hash_token(data.key)
+ try:
new_mapping = await prisma_client.db.litellm_jwtkeymapping.create(
data={
"jwt_claim_name": data.jwt_claim_name,
"jwt_claim_value": data.jwt_claim_value,
- "token": hashed_key,
+ "token": data.key,
+ "is_active": True,
}
)