{"record":{"id":"947ce3a86341d111","repo":"BerriAI/litellm","slug":"search-tool-with-id-search-tool-id-not-found-947ce3","errorCode":null,"errorMessage":"Search tool with ID {search_tool_id} not found","messagePattern":"Search tool with ID (.+?) not found","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"litellm/proxy/search_endpoints/search_tool_registry.py","lineNumber":103,"sourceCode":"    async def delete_search_tool_from_db(self, search_tool_id: str, prisma_client: PrismaClient):\n        \"\"\"\n        Delete a search tool from the database.\n\n        Args:\n            search_tool_id: ID of search tool to delete\n            prisma_client: Prisma client instance\n\n        Returns:\n            Dict with success message\n        \"\"\"\n        try:\n            # Get search tool before deletion for response\n            existing_tool: Final = await SearchToolsRepository(prisma_client).table.find_unique(\n                where={\"search_tool_id\": search_tool_id}\n            )\n\n            if not existing_tool:\n                raise Exception(f\"Search tool with ID {search_tool_id} not found\")\n\n            # Delete from DB\n            await SearchToolsRepository(prisma_client).table.delete(where={\"search_tool_id\": search_tool_id})\n\n            return {\n                \"message\": f\"Search tool {search_tool_id} deleted successfully\",\n                \"search_tool_name\": existing_tool.search_tool_name,\n            }\n        except Exception as e:\n            verbose_proxy_logger.exception(\"Error deleting search tool from DB: %s\", e)\n            raise Exception(f\"Error deleting search tool from DB: {e}\")\n\n    async def update_search_tool_in_db(self, search_tool_id: str, search_tool: SearchTool, prisma_client: PrismaClient):\n        \"\"\"\n        Update a search tool in the database.\n\n        Args:\n            search_tool_id: ID of search tool to update","sourceCodeStart":85,"sourceCodeEnd":121,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/search_endpoints/search_tool_registry.py#L85-L121","documentation":"Delete guard in the search tool registry: find_unique for the search_tool_id returned no row, so the tool to delete does not exist (already deleted or wrong ID); raised as a bare Exception from the registry's delete routine.","triggerScenarios":"Thrown at litellm/proxy/search_endpoints/search_tool_registry.py:103 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the search tool ID via the list endpoint; recreate the tool if it was removed."],"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"}