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(policy): use litellm.acompletion directly in AiPolicySuggester
Julio Quinteros Pro3381d6217f00
diff --git a/litellm/proxy/management_endpoints/policy_endpoints/ai_policy_suggester.py b/litellm/proxy/management_endpoints/policy_endpoints/ai_policy_suggester.pyindex ae0dc5c20eb..040acd9222c 100644--- a/litellm/proxy/management_endpoints/policy_endpoints/ai_policy_suggester.py+++ b/litellm/proxy/management_endpoints/policy_endpoints/ai_policy_suggester.py@@ -6,6 +6,7 @@ based on user-provided attack examples and descriptions.import jsonfrom typing import List, Optional+import litellmfrom litellm._logging import verbose_proxy_loggerfrom litellm.constants import DEFAULT_COMPETITOR_DISCOVERY_MODEL@@ -56,17 +57,12 @@ class AiPolicySuggester:description: str,model: Optional[str] = None,) -> dict:- from litellm.proxy.proxy_server import llm_router-- if llm_router is None:- raise ValueError("LLM router not initialized")-system_prompt = self._build_system_prompt(templates)user_prompt = self._build_user_prompt(attack_examples, description)model = model or DEFAULT_COMPETITOR_DISCOVERY_MODELtry:- response = await llm_router.acompletion(+ response = await litellm.acompletion(model=model,messages=[{"role": "system", "content": system_prompt},