From 6fa74af6c3dbc282ad4714623ed563ae1f791d3b Mon Sep 17 00:00:00 2001 From: Cesar Garcia <128240629+Chesars@users.noreply.github.com> Date: Wed, 4 Mar 2026 19:06:45 -0300 Subject: [PATCH] Update litellm/llms/black_forest_labs/image_edit/transformation.py Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- .../llms/black_forest_labs/image_edit/transformation.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/litellm/llms/black_forest_labs/image_edit/transformation.py b/litellm/llms/black_forest_labs/image_edit/transformation.py index 23ebd9840ab..ccb63bde941 100644 --- a/litellm/llms/black_forest_labs/image_edit/transformation.py +++ b/litellm/llms/black_forest_labs/image_edit/transformation.py @@ -231,9 +231,14 @@ class BlackForestLabsImageEditConfig(BaseImageEditConfig): "input_image": b64_image, } - # Add optional params + # Add optional params (only BFL-recognized parameters) + bfl_request_params = [ + "seed", "output_format", "safety_tolerance", "prompt_upsampling", + "aspect_ratio", "steps", "guidance", "grow_mask", + "top", "bottom", "left", "right", + ] for key, value in image_edit_optional_request_params.items(): - if key not in ["extra_headers", "extra_body", "mask"] and value is not None: + if key in bfl_request_params and value is not None: request_body[key] = value # Handle mask if provided (for inpainting)