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

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
Cesar Garcia 2026-03-04 19:06:45 -03:00 committed by GitHub
parent 269911d6fe
commit 6fa74af6c3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)