litellm icon indicating copy to clipboard operation
litellm copied to clipboard

[Bug]: Search tool 'test-search' not found in router.search_tools

Open sheldonxxxx opened this issue 5 months ago • 4 comments

What happened?

Started the proxy server using this config

search_tools:
  - search_tool_name: test-search
    litellm_params:
      search_provider: searxng
      api_base: http://searxng:8080

From log, I can confirm this config is correctly loaded

LiteLLM: Proxy initialized with Search Tools:
    test-search (searxng)

But when I test with curl, received the below error

{
    "error": {
        "message": "Search tool 'test-search' not found in router.search_tools",
        "type": "None",
        "param": "None",
        "code": "500"
    }
}

Relevant log output


Are you a ML Ops Team?

No

What LiteLLM version are you on ?

1.79.3

Twitter / LinkedIn details

No response

sheldonxxxx avatar Nov 14 '25 09:11 sheldonxxxx

I tried to add Tavily using UI (since UI does not support setting api_base for searxng) and it worked. Seem like search setting in config is not use when DB is enabled

sheldonxxxx avatar Nov 14 '25 10:11 sheldonxxxx

Having the same issue. Only search_tools from DB are available, not from config file like the docs show: https://docs.litellm.ai/docs/search#litellm-ai-gateway-usage

bensi94 avatar Nov 15 '25 10:11 bensi94

Same issue - interestingly though they seem to be instantiated at boot, in the logs I see:

litellm           | LiteLLM: Proxy initialized with Search Tools:
litellm           |     exa-search (exa_ai)
litellm           |     perplexity-search (perplexity)

natecobb avatar Nov 17 '25 21:11 natecobb

same issue here with google, tavily.

version: 1.79.3

following docs: https://docs.litellm.ai/docs/search#litellm-ai-gateway-usage

error:

curl https://$LITELLM_DOMAIN/v1/search/google \
  -H "Authorization: Bearer $LITELLM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "latest AI news",
    "max_results": 5
  }'
{"error":{"message":"Search tool 'google' not found in router.search_tools","type":"None","param":"None","code":"500"}}%
curl https://$LITELLM_DOMAIN/v1/search/tavily \
  -H "Authorization: Bearer $LITELLM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "latest AI news",
    "max_results": 5
  }'
{"error":{"message":"Search tool 'tavily' not found in router.search_tools","type":"None","param":"None","code":"500"}}%

ShangjinTang avatar Nov 22 '25 03:11 ShangjinTang