mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +00:00
Merge 5cddf3c345 into 71449b9c55
This commit is contained in:
commit
6dff27176b
3 changed files with 65 additions and 2 deletions
|
|
@ -457,7 +457,7 @@ module "litellm" {
|
|||
# Production: provide an ACM cert. Without one, set allow_plaintext_alb = true
|
||||
# (dev/trial only).
|
||||
# acm_certificate_arn = "arn:aws:acm:us-west-2:111122223333:certificate/..."
|
||||
allow_plaintext_alb = true
|
||||
# allow_plaintext_alb = true
|
||||
}
|
||||
|
||||
output "litellm_url" {
|
||||
|
|
@ -521,7 +521,7 @@ module "litellm" {
|
|||
# Production: provide DNS already pointing at the LB IP for Google-managed certs.
|
||||
# Without one, set allow_plaintext_lb = true (dev/trial only).
|
||||
# lb_domains = ["proxy.example.com"]
|
||||
allow_plaintext_lb = true
|
||||
# allow_plaintext_lb = true
|
||||
}
|
||||
|
||||
output "litellm_url" {
|
||||
|
|
|
|||
|
|
@ -3272,6 +3272,34 @@
|
|||
"supports_response_schema": true,
|
||||
"supports_tool_choice": true
|
||||
},
|
||||
"azure_ai/gpt-image-2": {
|
||||
"cache_read_input_image_token_cost": 2e-06,
|
||||
"cache_read_input_token_cost": 1.25e-06,
|
||||
"input_cost_per_token": 5e-06,
|
||||
"input_cost_per_image_token": 8e-06,
|
||||
"litellm_provider": "azure_ai",
|
||||
"mode": "image_generation",
|
||||
"output_cost_per_image_token": 3e-05,
|
||||
"supported_endpoints": [
|
||||
"/v1/images/generations",
|
||||
"/v1/images/edits"
|
||||
],
|
||||
"supports_vision": true
|
||||
},
|
||||
"azure_ai/gpt-image-to-image": {
|
||||
"cache_read_input_image_token_cost": 2e-06,
|
||||
"cache_read_input_token_cost": 1.25e-06,
|
||||
"input_cost_per_token": 5e-06,
|
||||
"input_cost_per_image_token": 8e-06,
|
||||
"litellm_provider": "azure_ai",
|
||||
"mode": "image_generation",
|
||||
"output_cost_per_image_token": 3e-05,
|
||||
"supported_endpoints": [
|
||||
"/v1/images/generations",
|
||||
"/v1/images/edits"
|
||||
],
|
||||
"supports_vision": true
|
||||
},
|
||||
"azure_ai/gpt-5.5": {
|
||||
"deprecation_date": "2027-10-26",
|
||||
"cache_read_input_token_cost": 5e-07,
|
||||
|
|
|
|||
|
|
@ -860,6 +860,7 @@ def test_aaamodel_prices_and_context_window_json_is_valid():
|
|||
"cache_creation_input_token_cost_flex": {"type": "number"},
|
||||
"cache_creation_input_token_cost_priority": {"type": "number"},
|
||||
"cache_read_input_token_cost": {"type": "number"},
|
||||
"cache_read_input_image_token_cost": {"type": "number"},
|
||||
"cache_read_input_token_cost_above_200k_tokens": {"type": "number"},
|
||||
"cache_read_input_token_cost_above_272k_tokens": {"type": "number"},
|
||||
"cache_read_input_token_cost_above_272k_tokens_flex": {
|
||||
|
|
@ -3859,6 +3860,39 @@ class TestValidateAndFixThinkingParam:
|
|||
assert validate_and_fix_thinking_param(thinking=False) is None
|
||||
|
||||
|
||||
def test_azure_ai_gpt_image_models_in_cost_map():
|
||||
"""
|
||||
Test that azure_ai/gpt-image-2 and azure_ai/gpt-image-to-image entries
|
||||
are correctly configured in model_prices_and_context_window.json.
|
||||
|
||||
Prices:
|
||||
- Text Input: $5/M tokens
|
||||
- Image Input: $8/M tokens
|
||||
- Image Output: $30/M tokens
|
||||
|
||||
Closes https://github.com/BerriAI/litellm/issues/26765
|
||||
"""
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
json_path = Path(__file__).parents[2] / "model_prices_and_context_window.json"
|
||||
with open(json_path) as f:
|
||||
model_cost = json.load(f)
|
||||
|
||||
for key in ["azure_ai/gpt-image-2", "azure_ai/gpt-image-to-image"]:
|
||||
info = model_cost.get(key)
|
||||
assert info is not None, f"{key} missing from model_prices_and_context_window.json"
|
||||
assert info["litellm_provider"] == "azure_ai"
|
||||
assert info["mode"] == "image_generation"
|
||||
assert info["input_cost_per_token"] == 5e-06
|
||||
assert info["input_cost_per_image_token"] == 8e-06
|
||||
assert info["output_cost_per_image_token"] == 3e-05
|
||||
assert info["cache_read_input_image_token_cost"] == 2e-06
|
||||
assert info["supports_vision"] is True
|
||||
assert info.get("output_cost_per_token") is None, f"Spurious output_cost_per_token found for {key}"
|
||||
assert info.get("supports_pdf_input") is None, f"Unexpected supports_pdf_input found for {key}"
|
||||
|
||||
|
||||
def test_deepseek_v4_models_in_cost_map():
|
||||
"""
|
||||
Test that deepseek-v4-flash and deepseek-v4-pro entries are correctly
|
||||
|
|
@ -4197,6 +4231,7 @@ def test_fireworks_models_in_backup_cost_map():
|
|||
), f"short-form {short_key} does not match long-form {long_key}"
|
||||
|
||||
|
||||
|
||||
class TestBedrockBaseModelLabelKeepsTools:
|
||||
"""Regression for #29618: a Bedrock deployment whose ``base_model`` is a friendly
|
||||
label must not silently drop ``tools``/``tool_choice`` under ``drop_params``."""
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue