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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
(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.pyindex 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-mediumsd3.5-largesd3.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 Truereturn False@classmethoddiff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.jsonindex 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.jsonindex 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.pyindex ecead06794a..1831c2a45e0 100644--- a/tests/local_testing/test_cost_calc.py+++ b/tests/local_testing/test_cost_calc.py@@ -10,7 +10,7 @@ import ossys.path.insert(0, os.path.abspath("../..")-) # Adds the parent directory to the system path+) # Adds the parent directory to the system-pathfrom typing import Literalimport pytest