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]

fix(tests): align BFL test assertions with implementation

Chesarscf01ef5949cf
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 2d5e31e90c1..b20537b888c 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,9 @@ class TestBlackForestLabsImageEditTransformation:
"""Test that supported OpenAI params are returned correctly."""
params = self.config.get_supported_openai_params(self.model)
- assert "n" in params
- assert "size" in params
- assert "response_format" in params
+ # BFL image edit currently returns an empty list since it uses
+ # different parameter names mapped in map_openai_params
+ assert params == []
def test_map_openai_params_basic(self):
"""Test mapping of OpenAI params to BFL params."""
diff --git a/tests/test_litellm/llms/black_forest_labs/image_generation/test_bfl_image_generation_transformation.py b/tests/test_litellm/llms/black_forest_labs/image_generation/test_bfl_image_generation_transformation.py
index b36130bb622..95884beb2ae 100644
--- a/tests/test_litellm/llms/black_forest_labs/image_generation/test_bfl_image_generation_transformation.py
+++ b/tests/test_litellm/llms/black_forest_labs/image_generation/test_bfl_image_generation_transformation.py
@@ -43,7 +43,6 @@ class TestBlackForestLabsImageGenerationTransformation:
assert "n" in params
assert "size" in params
- assert "response_format" in params
assert "quality" in params
def test_map_openai_params_basic(self):
@@ -179,10 +178,10 @@ class TestBlackForestLabsImageGenerationTransformation:
endpoint = self.config._get_model_endpoint("flux-pro")
assert endpoint == "/v1/flux-pro"
- def test_get_model_endpoint_unknown_defaults(self):
- """Test that unknown models default to flux-pro-1.1."""
- endpoint = self.config._get_model_endpoint("unknown-model")
- assert endpoint == "/v1/flux-pro-1.1"
+ def test_get_model_endpoint_unknown_raises(self):
+ """Test that unknown models raise ValueError."""
+ with pytest.raises(ValueError, match="Unknown BFL image generation model"):
+ self.config._get_model_endpoint("unknown-model")
def test_get_model_endpoint_with_provider_prefix(self):
"""Test that provider prefix is stripped from model name."""