{"record":{"id":"384b09970ab79fa5","repo":"BerriAI/litellm","slug":"transform-search-request-must-be-implemented-by-pr","errorCode":null,"errorMessage":"transform_search_request must be implemented by provider","messagePattern":"transform_search_request must be implemented by provider","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"litellm/llms/base_llm/search/transformation.py","lineNumber":230,"sourceCode":"\n    def transform_search_request(\n        self,\n        query: str | list[str],\n        optional_params: dict,\n        **kwargs,\n    ) -> dict | list[dict]:\n        \"\"\"\n        Transform Search request to provider-specific format.\n        Override in provider-specific implementations.\n\n        Args:\n            query: Search query (string or list of strings)\n            optional_params: Optional parameters for the request\n\n        Returns:\n            Dict with request data\n        \"\"\"\n        raise NotImplementedError(\"transform_search_request must be implemented by provider\")\n\n    def transform_search_response(\n        self,\n        raw_response: httpx.Response,\n        logging_obj: LiteLLMLoggingObj,\n        **kwargs,\n    ) -> SearchResponse:\n        \"\"\"\n        Transform provider-specific Search response to standard format.\n        Override in provider-specific implementations.\n        \"\"\"\n        raise NotImplementedError(\"transform_search_response must be implemented by provider\")\n\n    def get_error_class(\n        self,\n        error_message: str,\n        status_code: int,\n        headers: dict,","sourceCodeStart":212,"sourceCodeEnd":248,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/base_llm/search/transformation.py#L212-L248","documentation":"Raised by the abstract transform_search_request stub on the base search transformation. It fires when a provider config never implemented request transformation, so a caller-supplied search query cannot be mapped to the provider's request format.","triggerScenarios":"Thrown at litellm/llms/base_llm/search/transformation.py:230 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a provider that implements search; transform_search_request is abstract.","Implement transform_search_request in the custom provider's transformation class.","Verify the search provider name is supported."],"exampleFix":null,"handlingStrategy":"try-catch","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-23T08:17:48.524Z"}