BerriAI/litellm · error · NotImplementedError

get_complete_url must be implemented by provider

Error message

get_complete_url must be implemented by provider

What it means

Raised by the abstract get_complete_url stub on the base search transformation. It fires when a search provider config did not override URL construction, so the framework has no way to build the search endpoint URL for that provider.

Solutions

  1. Use a provider that implements search; get_complete_url is abstract in the base class.
  2. Implement get_complete_url in the custom search provider's transformation class.
  3. 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:211 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/4221284972995067. Report an issue: GitHub.

Appendix: source

Thrown at litellm/llms/base_llm/search/transformation.py:211

        """
        Get complete URL for Search endpoint.

        Args:
            api_base: Base URL for the API
            optional_params: Optional parameters for the request
            data: Transformed request body from transform_search_request().
                  Some providers (e.g., Google PSE) use GET requests and need
                  the request body to construct query parameters in the URL.
                  Can be a dict or list of dicts depending on provider.
            **kwargs: Additional keyword arguments

        Returns:
            Complete URL for the search endpoint

        Note:
            Override in provider-specific implementations.
        """
        raise NotImplementedError("get_complete_url must be implemented by provider")

    def transform_search_request(
        self,
        query: str | list[str],
        optional_params: dict,
        **kwargs,
    ) -> dict | list[dict]:
        """
        Transform Search request to provider-specific format.
        Override in provider-specific implementations.

        Args:
            query: Search query (string or list of strings)
            optional_params: Optional parameters for the request

        Returns:
            Dict with request data
        """

View on GitHub (pinned to 77b7c6c40c)