BerriAI/litellm · error · NotImplementedError
transform_search_response must be implemented by provider
Error message
transform_search_response must be implemented by provider
What it means
Raised by the abstract transform_search_response stub on the base search transformation. It fires when a provider config never implemented response transformation, so the raw httpx response from the search provider cannot be mapped to the standard SearchResponse format.
Solutions
- Use a provider that implements search; transform_search_response is abstract.
- Implement transform_search_response in the custom provider's transformation class.
- Verify the search provider name is supported.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at litellm/llms/base_llm/search/transformation.py:242 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/5320e9a20f67fa00.
Report an issue: GitHub.
Appendix: source
Thrown at litellm/llms/base_llm/search/transformation.py:242
query: Search query (string or list of strings)
optional_params: Optional parameters for the request
Returns:
Dict with request data
"""
raise NotImplementedError("transform_search_request must be implemented by provider")
def transform_search_response(
self,
raw_response: httpx.Response,
logging_obj: LiteLLMLoggingObj,
**kwargs,
) -> SearchResponse:
"""
Transform provider-specific Search response to standard format.
Override in provider-specific implementations.
"""
raise NotImplementedError("transform_search_response must be implemented by provider")
def get_error_class(
self,
error_message: str,
status_code: int,
headers: dict,
) -> Exception:
"""Get appropriate error class for the provider."""
return BaseLLMException(
status_code=status_code,
message=error_message,
headers=headers,
)
View on GitHub (pinned to 77b7c6c40c)