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]

(feat) add bedrock/stability.stable-image-ultra-v1:0 (#6723)

Ishaan Jaff7959dc9db333
diff --git a/litellm/llms/bedrock/image/amazon_stability3_transformation.py b/litellm/llms/bedrock/image/amazon_stability3_transformation.py
index 784e86b0493..2c90b3a1221 100644
--- a/litellm/llms/bedrock/image/amazon_stability3_transformation.py
+++ b/litellm/llms/bedrock/image/amazon_stability3_transformation.py
@@ -53,9 +53,15 @@ class AmazonStability3Config:
sd3-medium
sd3.5-large
sd3.5-large-turbo
+
+ Stability ultra models
+ stable-image-ultra-v1
"""
- if model and ("sd3" in model or "sd3.5" in model):
- return True
+ if model:
+ if "sd3" in model or "sd3.5" in model:
+ return True
+ if "stable-image-ultra-v1" in model:
+ return True
return False
@classmethod
diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.json
index fb8fb105c70..137818f6493 100644
--- a/litellm/model_prices_and_context_window_backup.json
+++ b/litellm/model_prices_and_context_window_backup.json
@@ -5620,6 +5620,13 @@
"litellm_provider": "bedrock",
"mode": "image_generation"
},
+ "stability.stable-image-ultra-v1:0": {
+ "max_tokens": 77,
+ "max_input_tokens": 77,
+ "output_cost_per_image": 0.14,
+ "litellm_provider": "bedrock",
+ "mode": "image_generation"
+ },
"sagemaker/meta-textgeneration-llama-2-7b": {
"max_tokens": 4096,
"max_input_tokens": 4096,
diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.json
index fb8fb105c70..137818f6493 100644
--- a/model_prices_and_context_window.json
+++ b/model_prices_and_context_window.json
@@ -5620,6 +5620,13 @@
"litellm_provider": "bedrock",
"mode": "image_generation"
},
+ "stability.stable-image-ultra-v1:0": {
+ "max_tokens": 77,
+ "max_input_tokens": 77,
+ "output_cost_per_image": 0.14,
+ "litellm_provider": "bedrock",
+ "mode": "image_generation"
+ },
"sagemaker/meta-textgeneration-llama-2-7b": {
"max_tokens": 4096,
"max_input_tokens": 4096,
diff --git a/tests/local_testing/test_cost_calc.py b/tests/local_testing/test_cost_calc.py
index ecead06794a..1831c2a45e0 100644
--- a/tests/local_testing/test_cost_calc.py
+++ b/tests/local_testing/test_cost_calc.py
@@ -10,7 +10,7 @@ import os
sys.path.insert(
0, os.path.abspath("../..")
-) # Adds the parent directory to the system path
+) # Adds the parent directory to the system-path
from typing import Literal
import pytest