{"record":{"id":"75881602408a7452","repo":"BerriAI/litellm","slug":"search-tool-search-tool-name-not-found-in-rout","errorCode":null,"errorMessage":"Search tool '{search_tool_name}' not found in router.search_tools","messagePattern":"Search tool '(.+?)' not found in router\\.search_tools","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/router_utils/search_api_router.py","lineNumber":106,"sourceCode":"        \"\"\"\n        Get all search tools matching the given name.\n\n        Args:\n            router_instance: The Router instance\n            search_tool_name: Name of the search tool to find\n\n        Returns:\n            List of matching search tool configurations\n\n        Raises:\n            ValueError: If no matching search tools are found\n        \"\"\"\n        matching_tools: Final = [\n            tool for tool in router_instance.search_tools if tool.get(\"search_tool_name\") == search_tool_name\n        ]\n\n        if not matching_tools:\n            raise ValueError(f\"Search tool '{search_tool_name}' not found in router.search_tools\")\n\n        return matching_tools\n\n    @staticmethod\n    async def async_search_with_fallbacks(\n        router_instance: Any,\n        original_function: Callable,\n        **kwargs,\n    ):\n        \"\"\"\n        Helper function to make a search API call through the router with load balancing and fallbacks.\n        Reuses the router's retry/fallback infrastructure.\n\n        Args:\n            router_instance: The Router instance\n            original_function: The original litellm.asearch function\n            **kwargs: Search parameters including search_tool_name, query, etc.\n","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/router_utils/search_api_router.py#L88-L124","documentation":"Lookup guard in the search API router: no entry in router.search_tools has a matching search_tool_name, so the router has no search provider configuration to dispatch the query to.","triggerScenarios":"Thrown at litellm/router_utils/search_api_router.py:106 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Register the search tool in router.search_tools or correct the search_tool_name."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}