From c2c42a2b784fee4663d0c6f814f87e7c730a5c48 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 4 Feb 2026 04:40:59 +0000 Subject: [PATCH] fix: only show semantic tool filter warning when explicitly enabled - Remove annoying warning when semantic tool filtering is not configured - Only warn if user explicitly enabled it but initialization failed - Fixes issue where warning appeared even when feature was never set up Co-authored-by: Ishaan Jaff --- litellm/proxy/proxy_server.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index b06071481eb..73f30c2896d 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -4786,7 +4786,8 @@ class ProxyStartupEvent: if hook: verbose_proxy_logger.debug("✅ Semantic tool filter hook registered") litellm.logging_callback_manager.add_litellm_callback(hook) - else: + elif mcp_semantic_filter_config is not None and mcp_semantic_filter_config.get("enabled", False): + # Only warn if user explicitly enabled it but initialization failed verbose_proxy_logger.warning("❌ Semantic tool filter hook not initialized") @classmethod