OpenAPI 3.1.02026-08-226994571.1 MB

1e929292ddd5

Search Tools

Test Search Tool Connection

Test connection to a search provider with the given configuration.

Makes a simple test search query to verify the API key and configuration are valid.

Example Request:

curl -X POST "http://localhost:4000/search_tools/test_connection" \
    -H "Authorization: Bearer <your_api_key>" \
    -H "Content-Type: application/json" \
    -d '{
        "litellm_params": {
            "search_provider": "perplexity",
            "api_key": "sk-..."
        }
    }'

Example Response (Success):

{
    "status": "success",
    "message": "Successfully connected to perplexity search provider",
    "test_query": "test",
    "results_count": 5
}

Example Response (Failure):

{
    "status": "error",
    "message": "Authentication failed: Invalid API key",
    "error_type": "AuthenticationError"
}
post/search_tools/test_connection

Request body

litellm_paramsobject required

Response

Successful Response

{"stackTrail":"paths:/search_tools/test_connection:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}