mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-08 22:21:35 +00:00
fix(bfl): add BFL-specific params to image edit get_supported_openai_params for consistency
This commit is contained in:
parent
f3cb45765b
commit
fa165a68d9
2 changed files with 20 additions and 4 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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."""
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue