BerriAI/litellm · error · NotImplementedError
get_supported_generate_content_optional_params is not implem
Error message
get_supported_generate_content_optional_params is not implemented
What it means
Error "get_supported_generate_content_optional_params is not implemented" thrown in BerriAI/litellm.
Source
Thrown at litellm/llms/base_llm/google_genai/transformation.py:61
classmethod,
staticmethod,
),
)
and v is not None
}
@abstractmethod
def get_supported_generate_content_optional_params(self, model: str) -> list[str]:
"""
Get the list of supported Google GenAI parameters for the model.
Args:
model: The model name
Returns:
List of supported parameter names
"""
raise NotImplementedError("get_supported_generate_content_optional_params is not implemented")
def get_generate_content_request_top_level_fields(self) -> tuple[str, ...]:
"""
Native Google ``GenerateContentRequest`` fields that sit at the top level
(siblings of ``generationConfig``) rather than inside it. The proxy forwards
these verbatim from a native request so ``generateContent`` is a drop-in for
Google's REST API.
Excludes ``contents``, ``model`` and ``tools`` (dedicated params),
``systemInstruction`` (dedicated extraction) and ``generationConfig`` (mapped
to ``config``).
"""
return ("safetySettings", "toolConfig", "cachedContent", "labels")
@abstractmethod
def map_generate_content_optional_params(
self,
generate_content_config_dict: GenerateContentConfigDict,View on GitHub (pinned to 77b7c6c40c)
Solutions
- Use a concrete Google GenAI config subclass implementing get_supported_generate_content_optional_params.
When it happens
Trigger: Thrown at litellm/llms/base_llm/google_genai/transformation.py:61 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/dad1fe5dc4a22ebc.
Report an issue: GitHub.