Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

Update litellm/llms/black_forest_labs/image_edit/transformation.py

Cesar Garcia6fa74af6c3db
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)