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 <ishaan-jaff@users.noreply.github.com>
This commit is contained in:
Cursor Agent 2026-02-04 04:40:59 +00:00
parent 7b8e3c7736
commit c2c42a2b78

View file

@ -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