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
test(proxy): type the moderation override stub in hook detection tests
yuchengfc77914df3cd
diff --git a/tests/test_litellm/proxy/test_proxy_logging_hook_detection.py b/tests/test_litellm/proxy/test_proxy_logging_hook_detection.pyindex 34d1488a4e5..58ee8ff656c 100644--- a/tests/test_litellm/proxy/test_proxy_logging_hook_detection.py+++ b/tests/test_litellm/proxy/test_proxy_logging_hook_detection.py@@ -8,6 +8,7 @@ from litellm.integrations.custom_logger import CustomLoggerfrom litellm.proxy._types import UserAPIKeyAuthfrom litellm.proxy.utils import ProxyLoggingfrom litellm.types.guardrails import GuardrailEventHooks+from litellm.types.utils import CallTypesLiteraldef test_has_post_call_response_headers_callbacks_ignores_empty_callbacks(@@ -609,7 +610,12 @@ class _RejectsInModeration(CustomLogger):super().__init__()self.moderated: list[str] = []- async def async_moderation_hook(self, data, user_api_key_dict, call_type):+ async def async_moderation_hook(+ self,+ data: dict,+ user_api_key_dict: UserAPIKeyAuth,+ call_type: CallTypesLiteral,+ ) -> None:self.moderated.append(call_type)raise HTTPException(status_code=400, detail={"error": "rejected"})