BerriAI/litellm · error · NotImplementedError

get_auth_token_and_url is not implemented

Error message

get_auth_token_and_url is not implemented

What it means

Error "get_auth_token_and_url is not implemented" thrown in BerriAI/litellm.

Source

Thrown at litellm/llms/base_llm/google_genai/transformation.py:155

    async def get_auth_token_and_url(
        self,
        api_base: str | None,
        model: str,
        litellm_params: dict,
        stream: bool,
    ) -> tuple[dict, str]:
        """
        Get the complete URL for the request.

        Args:
            api_base: Base API URL
            model: The model name
            litellm_params: LiteLLM parameters

        Returns:
            Tuple of headers and API base
        """
        raise NotImplementedError("get_auth_token_and_url is not implemented")

    @abstractmethod
    def transform_generate_content_request(
        self,
        model: str,
        contents: GenerateContentContentListUnionDict,
        tools: ToolConfigDict | None,
        generate_content_config_dict: dict,
        system_instruction: Any | None = None,
    ) -> dict:
        """
        Transform the request parameters for the generate content API.

        Args:
            model: The model name
            contents: Input contents
            tools: Tools
            generate_content_config_dict: Generation config parameters

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Use a concrete Google GenAI config subclass implementing get_auth_token_and_url.

When it happens

Trigger: Thrown at litellm/llms/base_llm/google_genai/transformation.py:155 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/44e4572b8952f231. Report an issue: GitHub.