From fa165a68d92770610b804d1290e51085319f752e Mon Sep 17 00:00:00 2001 From: Chesars Date: Wed, 4 Mar 2026 23:04:48 -0300 Subject: [PATCH] fix(bfl): add BFL-specific params to image edit get_supported_openai_params for consistency --- .../image_edit/transformation.py | 15 ++++++++++++++- .../test_bfl_image_edit_transformation.py | 9 ++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/litellm/llms/black_forest_labs/image_edit/transformation.py b/litellm/llms/black_forest_labs/image_edit/transformation.py index 228dada44bb..dbb657e5462 100644 --- a/litellm/llms/black_forest_labs/image_edit/transformation.py +++ b/litellm/llms/black_forest_labs/image_edit/transformation.py @@ -54,7 +54,20 @@ class BlackForestLabsImageEditConfig(BaseImageEditConfig): Note: BFL uses different parameter names, these are mapped in map_openai_params. """ - return [] + return [ + "seed", + "output_format", + "safety_tolerance", + "prompt_upsampling", + "aspect_ratio", + "steps", + "guidance", + "grow_mask", + "top", + "bottom", + "left", + "right", + ] def map_openai_params( self, diff --git a/tests/test_litellm/llms/black_forest_labs/image_edit/test_bfl_image_edit_transformation.py b/tests/test_litellm/llms/black_forest_labs/image_edit/test_bfl_image_edit_transformation.py index b20537b888c..7709734e5ef 100644 --- a/tests/test_litellm/llms/black_forest_labs/image_edit/test_bfl_image_edit_transformation.py +++ b/tests/test_litellm/llms/black_forest_labs/image_edit/test_bfl_image_edit_transformation.py @@ -46,9 +46,12 @@ class TestBlackForestLabsImageEditTransformation: """Test that supported OpenAI params are returned correctly.""" params = self.config.get_supported_openai_params(self.model) - # BFL image edit currently returns an empty list since it uses - # different parameter names mapped in map_openai_params - assert params == [] + # BFL image edit supports BFL-specific params passed through directly + assert isinstance(params, list) + assert len(params) > 0 + assert "seed" in params + assert "output_format" in params + assert "safety_tolerance" in params def test_map_openai_params_basic(self): """Test mapping of OpenAI params to BFL params."""