{"record":{"id":"e81f6815aea3f4bd","repo":"BerriAI/litellm","slug":"map-generate-content-optional-params-is-not-implem","errorCode":null,"errorMessage":"map_generate_content_optional_params is not implemented","messagePattern":"map_generate_content_optional_params is not implemented","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"litellm/llms/base_llm/google_genai/transformation.py","lineNumber":92,"sourceCode":"        return (\"safetySettings\", \"toolConfig\", \"cachedContent\", \"labels\")\n\n    @abstractmethod\n    def map_generate_content_optional_params(\n        self,\n        generate_content_config_dict: GenerateContentConfigDict,\n        model: str,\n    ) -> dict[str, Any]:\n        \"\"\"\n        Map Google GenAI parameters to provider-specific format.\n\n        Args:\n            generate_content_optional_params: Optional parameters for generate content\n            model: The model name\n\n        Returns:\n            Mapped parameters for the provider\n        \"\"\"\n        raise NotImplementedError(\"map_generate_content_optional_params is not implemented\")\n\n    @abstractmethod\n    def validate_environment(\n        self,\n        api_key: str | None,\n        headers: dict | None,\n        model: str,\n        litellm_params: GenericLiteLLMParams | dict | None,\n    ) -> dict:\n        \"\"\"\n        Validate the environment and return headers for the request.\n\n        Args:\n            api_key: API key\n            headers: Existing headers\n            model: The model name\n            litellm_params: LiteLLM parameters\n","sourceCodeStart":74,"sourceCodeEnd":110,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/base_llm/google_genai/transformation.py#L74-L110","documentation":"Error \"map_generate_content_optional_params is not implemented\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/base_llm/google_genai/transformation.py:92 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a concrete Google GenAI config subclass implementing map_generate_content_optional_params."],"exampleFix":null,"handlingStrategy":null,"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-14T00:17:10.932Z"}