Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions litellm/llms/bedrock/image/amazon_stability3_transformation.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,15 @@ def _is_stability_3_model(cls, model: Optional[str] = None) -> bool:
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
Expand Down
7 changes: 7 additions & 0 deletions litellm/model_prices_and_context_window_backup.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
7 changes: 7 additions & 0 deletions model_prices_and_context_window.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tests/local_testing/test_cost_calc.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

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
Expand Down
2 changes: 1 addition & 1 deletion tests/local_testing/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down