mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-20 00:11:50 +00:00
The hook returned early when the semantic filter selected no tools, which restated a policy that SemanticMCPToolFilter.filter_tools already owns: it returns the full tool set when nothing matches, so the selection is never empty. The branch was unreachable, and reachable or not it changed nothing, since the gateway reads the union of every reference's allowed_tools and treats an empty union as unset. Its only effect was to suggest the reference path and the plain tool path resolve a zero-match query differently. Drop it so a single policy governs both paths, and pin that with a test covering an unmatched query on each path. Flipping filter_tools to fail closed now fails the test on both instead of quietly hard-limiting one surface and not the other. |
||
|---|---|---|
| .. | ||
| mcp_server | ||