{"record":{"id":"c9bb508e6bf26792","repo":"BerriAI/litellm","slug":"empty-image-list-provided","errorCode":null,"errorMessage":"Empty image list provided","messagePattern":"Empty image list provided","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/azure_ai/image_edit/flux2_transformation.py","lineNumber":130,"sourceCode":"        # Build request body with required params\n        request_body: Final[dict[str, Any]] = {\n            \"prompt\": prompt,\n            \"image\": image_b64,\n            \"model\": model,\n        }\n\n        # Add mapped optional params (already filtered by map_openai_params)\n        request_body.update(image_edit_optional_request_params)\n\n        # Return JSON body and empty files list (FLUX 2 doesn't use multipart)\n        return request_body, []\n\n    def _convert_image_to_base64(self, image: Any) -> str:\n        \"\"\"Convert image file to base64 string\"\"\"\n        # Handle list of images (take first one)\n        if isinstance(image, list):\n            if len(image) == 0:\n                raise ValueError(\"Empty image list provided\")\n            image = image[0]\n\n        if isinstance(image, BufferedReader):\n            image_bytes = image.read()\n            image.seek(0)  # Reset file pointer for potential reuse\n        elif isinstance(image, bytes):\n            image_bytes = image\n        elif hasattr(image, \"read\"):\n            image_bytes = image.read()\n        else:\n            raise ValueError(f\"Unsupported image type: {type(image)}\")\n\n        return base64.b64encode(image_bytes).decode(\"utf-8\")\n\n    def get_complete_url(\n        self,\n        model: str,\n        api_base: str | None,","sourceCodeStart":112,"sourceCodeEnd":148,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/azure_ai/image_edit/flux2_transformation.py#L112-L148","documentation":"Error \"Empty image list provided\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/azure_ai/image_edit/flux2_transformation.py:130 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a non-empty image list."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}