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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix linting
Ishaan Jaffer5b341ee842e2
diff --git a/litellm/proxy/policy_engine/policy_registry.py b/litellm/proxy/policy_engine/policy_registry.pyindex 6a251a584cb..5fb5084f648 100644--- a/litellm/proxy/policy_engine/policy_registry.py+++ b/litellm/proxy/policy_engine/policy_registry.py@@ -207,8 +207,6 @@ class PolicyRegistry:PolicyDBResponse with the created policy"""try:- from prisma import Json-# Build data dict, only include condition if it's setdata: Dict[str, Any] = {"policy_name": policy_request.policy_name,@@ -227,7 +225,7 @@ class PolicyRegistry:data["created_by"] = created_bydata["updated_by"] = created_byif policy_request.condition is not None:- data["condition"] = Json(policy_request.condition.model_dump())+ data["condition"] = policy_request.condition.model_dump()created_policy = await prisma_client.db.litellm_policytable.create(data=data@@ -304,8 +302,7 @@ class PolicyRegistry:if policy_request.guardrails_remove is not None:update_data["guardrails_remove"] = policy_request.guardrails_removeif policy_request.condition is not None:- from prisma import Json- update_data["condition"] = Json(policy_request.condition.model_dump())+ update_data["condition"] = policy_request.condition.model_dump()updated_policy = await prisma_client.db.litellm_policytable.update(where={"policy_id": policy_id},