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(bfl): correct mode and variable shadowing from review feedback

Chesars7ee4a40fc4df
diff --git a/litellm/llms/black_forest_labs/image_edit/handler.py b/litellm/llms/black_forest_labs/image_edit/handler.py
index 38abb497e53..bd7809ec4b6 100644
--- a/litellm/llms/black_forest_labs/image_edit/handler.py
+++ b/litellm/llms/black_forest_labs/image_edit/handler.py
@@ -211,7 +211,6 @@ class BlackForestLabsImageEdit:
if extra_headers:
headers.update(extra_headers)
- # Get complete URL
# Get complete URL
complete_url = self.config.get_complete_url(
model=model,
@@ -236,7 +235,7 @@ class BlackForestLabsImageEdit:
api_key="",
additional_args={
"complete_input_dict": data,
- "api_base": api_base,
+ "api_base": complete_url,
"headers": headers,
},
)
@@ -244,7 +243,7 @@ class BlackForestLabsImageEdit:
# Make initial request
try:
response = await async_client.post(
- url=api_base,
+ url=complete_url,
headers=headers,
json=data,
timeout=timeout,
diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.json
index 29525276481..bb27acff72b 100644
--- a/model_prices_and_context_window.json
+++ b/model_prices_and_context_window.json
@@ -7788,7 +7788,7 @@
},
"black_forest_labs/flux-kontext-pro": {
"litellm_provider": "black_forest_labs",
- "mode": "image_generation",
+ "mode": "image_edit",
"output_cost_per_image": 0.04,
"source": "https://bfl.ai/pricing",
"supported_endpoints": [
@@ -7797,7 +7797,7 @@
},
"black_forest_labs/flux-kontext-max": {
"litellm_provider": "black_forest_labs",
- "mode": "image_generation",
+ "mode": "image_edit",
"output_cost_per_image": 0.08,
"source": "https://bfl.ai/pricing",
"supported_endpoints": [
@@ -7806,7 +7806,7 @@
},
"black_forest_labs/flux-pro-1.0-fill": {
"litellm_provider": "black_forest_labs",
- "mode": "image_generation",
+ "mode": "image_edit",
"output_cost_per_image": 0.05,
"source": "https://bfl.ai/pricing",
"supported_endpoints": [
@@ -7815,7 +7815,7 @@
},
"black_forest_labs/flux-pro-1.0-expand": {
"litellm_provider": "black_forest_labs",
- "mode": "image_generation",
+ "mode": "image_edit",
"output_cost_per_image": 0.05,
"source": "https://bfl.ai/pricing",
"supported_endpoints": [