From ca6a34033459014cf3468ee3e203dc07c5913271 Mon Sep 17 00:00:00 2001 From: weiguangli-io Date: Wed, 29 Apr 2026 11:54:55 +0800 Subject: [PATCH] fix(azure_ai): use correct 'input_image' key for FLUX.2-pro image editing (#26698) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Black Forest Labs API for FLUX.2-pro image editing expects the base64-encoded image under the key "input_image", not "image". Using the wrong key ("image") causes the API to silently ignore the field, so no image is passed to the model — making the bug very hard to detect since no error is returned. Fixes #26698 Co-Authored-By: Claude Sonnet 4.6 --- litellm/llms/azure_ai/image_edit/flux2_transformation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/llms/azure_ai/image_edit/flux2_transformation.py b/litellm/llms/azure_ai/image_edit/flux2_transformation.py index 1bc3bdcddc1..28b9e1df039 100644 --- a/litellm/llms/azure_ai/image_edit/flux2_transformation.py +++ b/litellm/llms/azure_ai/image_edit/flux2_transformation.py @@ -112,7 +112,7 @@ class AzureFoundryFlux2ImageEditConfig(OpenAIImageEditConfig): # Build request body with required params request_body: Dict[str, Any] = { "prompt": prompt, - "image": image_b64, + "input_image": image_b64, "model": model, }