diff --git a/litellm/llms/bedrock/image/amazon_stability3_transformation.py b/litellm/llms/bedrock/image/amazon_stability3_transformation.py index 784e86b04..2c90b3a12 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 fb8fb105c..137818f64 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 fb8fb105c..137818f64 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 ecead0679..1831c2a45 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 diff --git a/tests/local_testing/test_utils.py b/tests/local_testing/test_utils.py index b3f8208bf..31f17eed9 100644 --- a/tests/local_testing/test_utils.py +++ b/tests/local_testing/test_utils.py @@ -748,7 +748,7 @@ def test_convert_model_response_object(): ("vertex_ai/gemini-1.5-pro", True), ("gemini/gemini-1.5-pro", True), ("predibase/llama3-8b-instruct", True), - ("gpt-4o", False), + ("gpt-3.5-turbo", False), ], ) def test_supports_response_schema(model, expected_bool):