mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-08 22:21:35 +00:00
Merge pull request #26651 from lmcdonald-godaddy/gpt-5.5-pro-fix-pricing
Some checks are pending
Unit Tests: Proxy DB Operations / custom-logging (push) Blocked by required conditions
Unit Tests: Proxy DB Operations / db-and-spend (push) Blocked by required conditions
Unit Tests: Proxy DB Operations / endpoints-and-responses (push) Blocked by required conditions
Unit Tests: Proxy DB Operations / guardrails-hooks (push) Blocked by required conditions
Unit Tests: Proxy DB Operations / jwt-and-keys (push) Blocked by required conditions
Unit Tests: Proxy DB Operations / key-generation (push) Blocked by required conditions
Unit Tests: Proxy DB Operations / logging-misc (push) Blocked by required conditions
Unit Tests: Proxy DB Operations / proxy-runtime (push) Blocked by required conditions
Unit Tests: Proxy DB Operations / proxy-server-core (push) Blocked by required conditions
Unit Tests: Proxy DB Operations / schema-migration (push) Blocked by required conditions
Unit Tests: Proxy DB Operations / proxy-utils (push) Blocked by required conditions
Unit Tests: Security / security (push) Waiting to run
Unit Tests: Caching (Redis) / caching-redis (push) Waiting to run
Unit Tests: Proxy DB Operations / assert-shard-coverage (push) Waiting to run
Unit Tests: Proxy DB Operations / auth-checks (push) Blocked by required conditions
Unit Tests: Proxy DB Operations / budgets (push) Blocked by required conditions
Some checks are pending
Unit Tests: Proxy DB Operations / custom-logging (push) Blocked by required conditions
Unit Tests: Proxy DB Operations / db-and-spend (push) Blocked by required conditions
Unit Tests: Proxy DB Operations / endpoints-and-responses (push) Blocked by required conditions
Unit Tests: Proxy DB Operations / guardrails-hooks (push) Blocked by required conditions
Unit Tests: Proxy DB Operations / jwt-and-keys (push) Blocked by required conditions
Unit Tests: Proxy DB Operations / key-generation (push) Blocked by required conditions
Unit Tests: Proxy DB Operations / logging-misc (push) Blocked by required conditions
Unit Tests: Proxy DB Operations / proxy-runtime (push) Blocked by required conditions
Unit Tests: Proxy DB Operations / proxy-server-core (push) Blocked by required conditions
Unit Tests: Proxy DB Operations / schema-migration (push) Blocked by required conditions
Unit Tests: Proxy DB Operations / proxy-utils (push) Blocked by required conditions
Unit Tests: Security / security (push) Waiting to run
Unit Tests: Caching (Redis) / caching-redis (push) Waiting to run
Unit Tests: Proxy DB Operations / assert-shard-coverage (push) Waiting to run
Unit Tests: Proxy DB Operations / auth-checks (push) Blocked by required conditions
Unit Tests: Proxy DB Operations / budgets (push) Blocked by required conditions
fix(pricing): GPT-5.5 Pro Pricing
This commit is contained in:
commit
b3377b2d17
3 changed files with 74 additions and 74 deletions
|
|
@ -4735,17 +4735,17 @@
|
|||
"supports_web_search": true
|
||||
},
|
||||
"azure/gpt-5.5-pro": {
|
||||
"cache_read_input_token_cost": 6e-06,
|
||||
"cache_read_input_token_cost_above_272k_tokens": 1.2e-05,
|
||||
"input_cost_per_token": 6e-05,
|
||||
"input_cost_per_token_above_272k_tokens": 0.00012,
|
||||
"cache_read_input_token_cost": 3e-06,
|
||||
"cache_read_input_token_cost_above_272k_tokens": 6e-06,
|
||||
"input_cost_per_token": 3e-05,
|
||||
"input_cost_per_token_above_272k_tokens": 6e-05,
|
||||
"litellm_provider": "azure",
|
||||
"max_input_tokens": 1050000,
|
||||
"max_output_tokens": 128000,
|
||||
"max_tokens": 128000,
|
||||
"mode": "responses",
|
||||
"output_cost_per_token": 0.00036,
|
||||
"output_cost_per_token_above_272k_tokens": 0.00054,
|
||||
"output_cost_per_token": 0.00018,
|
||||
"output_cost_per_token_above_272k_tokens": 0.00027,
|
||||
"supported_endpoints": [
|
||||
"/v1/batch",
|
||||
"/v1/responses"
|
||||
|
|
@ -4774,17 +4774,17 @@
|
|||
"supports_low_reasoning_effort": false
|
||||
},
|
||||
"azure/gpt-5.5-pro-2026-04-23": {
|
||||
"cache_read_input_token_cost": 6e-06,
|
||||
"cache_read_input_token_cost_above_272k_tokens": 1.2e-05,
|
||||
"input_cost_per_token": 6e-05,
|
||||
"input_cost_per_token_above_272k_tokens": 0.00012,
|
||||
"cache_read_input_token_cost": 3e-06,
|
||||
"cache_read_input_token_cost_above_272k_tokens": 6e-06,
|
||||
"input_cost_per_token": 3e-05,
|
||||
"input_cost_per_token_above_272k_tokens": 6e-05,
|
||||
"litellm_provider": "azure",
|
||||
"max_input_tokens": 1050000,
|
||||
"max_output_tokens": 128000,
|
||||
"max_tokens": 128000,
|
||||
"mode": "responses",
|
||||
"output_cost_per_token": 0.00036,
|
||||
"output_cost_per_token_above_272k_tokens": 0.00054,
|
||||
"output_cost_per_token": 0.00018,
|
||||
"output_cost_per_token_above_272k_tokens": 0.00027,
|
||||
"supported_endpoints": [
|
||||
"/v1/batch",
|
||||
"/v1/responses"
|
||||
|
|
@ -19898,21 +19898,21 @@
|
|||
"supports_minimal_reasoning_effort": true
|
||||
},
|
||||
"gpt-5.5-pro": {
|
||||
"cache_read_input_token_cost": 6e-06,
|
||||
"cache_read_input_token_cost_above_272k_tokens": 1.2e-05,
|
||||
"input_cost_per_token": 6e-05,
|
||||
"input_cost_per_token_above_272k_tokens": 0.00012,
|
||||
"input_cost_per_token_flex": 3e-05,
|
||||
"input_cost_per_token_batches": 3e-05,
|
||||
"cache_read_input_token_cost": 3e-06,
|
||||
"cache_read_input_token_cost_above_272k_tokens": 6e-06,
|
||||
"input_cost_per_token": 3e-05,
|
||||
"input_cost_per_token_above_272k_tokens": 6e-05,
|
||||
"input_cost_per_token_flex": 1.5e-05,
|
||||
"input_cost_per_token_batches": 1.5e-05,
|
||||
"litellm_provider": "openai",
|
||||
"max_input_tokens": 1050000,
|
||||
"max_output_tokens": 128000,
|
||||
"max_tokens": 128000,
|
||||
"mode": "responses",
|
||||
"output_cost_per_token": 0.00036,
|
||||
"output_cost_per_token_above_272k_tokens": 0.00054,
|
||||
"output_cost_per_token_flex": 0.00018,
|
||||
"output_cost_per_token_batches": 0.00018,
|
||||
"output_cost_per_token": 0.00018,
|
||||
"output_cost_per_token_above_272k_tokens": 0.00027,
|
||||
"output_cost_per_token_flex": 9e-05,
|
||||
"output_cost_per_token_batches": 9e-05,
|
||||
"supported_endpoints": [
|
||||
"/v1/responses",
|
||||
"/v1/batch"
|
||||
|
|
@ -19941,21 +19941,21 @@
|
|||
"supports_minimal_reasoning_effort": true
|
||||
},
|
||||
"gpt-5.5-pro-2026-04-23": {
|
||||
"cache_read_input_token_cost": 6e-06,
|
||||
"cache_read_input_token_cost_above_272k_tokens": 1.2e-05,
|
||||
"input_cost_per_token": 6e-05,
|
||||
"input_cost_per_token_above_272k_tokens": 0.00012,
|
||||
"input_cost_per_token_flex": 3e-05,
|
||||
"input_cost_per_token_batches": 3e-05,
|
||||
"cache_read_input_token_cost": 3e-06,
|
||||
"cache_read_input_token_cost_above_272k_tokens": 6e-06,
|
||||
"input_cost_per_token": 3e-05,
|
||||
"input_cost_per_token_above_272k_tokens": 6e-05,
|
||||
"input_cost_per_token_flex": 1.5e-05,
|
||||
"input_cost_per_token_batches": 1.5e-05,
|
||||
"litellm_provider": "openai",
|
||||
"max_input_tokens": 1050000,
|
||||
"max_output_tokens": 128000,
|
||||
"max_tokens": 128000,
|
||||
"mode": "responses",
|
||||
"output_cost_per_token": 0.00036,
|
||||
"output_cost_per_token_above_272k_tokens": 0.00054,
|
||||
"output_cost_per_token_flex": 0.00018,
|
||||
"output_cost_per_token_batches": 0.00018,
|
||||
"output_cost_per_token": 0.00018,
|
||||
"output_cost_per_token_above_272k_tokens": 0.00027,
|
||||
"output_cost_per_token_flex": 9e-05,
|
||||
"output_cost_per_token_batches": 9e-05,
|
||||
"supported_endpoints": [
|
||||
"/v1/responses",
|
||||
"/v1/batch"
|
||||
|
|
|
|||
|
|
@ -4749,17 +4749,17 @@
|
|||
"supports_web_search": true
|
||||
},
|
||||
"azure/gpt-5.5-pro": {
|
||||
"cache_read_input_token_cost": 6e-06,
|
||||
"cache_read_input_token_cost_above_272k_tokens": 1.2e-05,
|
||||
"input_cost_per_token": 6e-05,
|
||||
"input_cost_per_token_above_272k_tokens": 0.00012,
|
||||
"cache_read_input_token_cost": 3e-06,
|
||||
"cache_read_input_token_cost_above_272k_tokens": 6e-06,
|
||||
"input_cost_per_token": 3e-05,
|
||||
"input_cost_per_token_above_272k_tokens": 6e-05,
|
||||
"litellm_provider": "azure",
|
||||
"max_input_tokens": 1050000,
|
||||
"max_output_tokens": 128000,
|
||||
"max_tokens": 128000,
|
||||
"mode": "responses",
|
||||
"output_cost_per_token": 0.00036,
|
||||
"output_cost_per_token_above_272k_tokens": 0.00054,
|
||||
"output_cost_per_token": 0.00018,
|
||||
"output_cost_per_token_above_272k_tokens": 0.00027,
|
||||
"supported_endpoints": [
|
||||
"/v1/batch",
|
||||
"/v1/responses"
|
||||
|
|
@ -4788,17 +4788,17 @@
|
|||
"supports_low_reasoning_effort": false
|
||||
},
|
||||
"azure/gpt-5.5-pro-2026-04-23": {
|
||||
"cache_read_input_token_cost": 6e-06,
|
||||
"cache_read_input_token_cost_above_272k_tokens": 1.2e-05,
|
||||
"input_cost_per_token": 6e-05,
|
||||
"input_cost_per_token_above_272k_tokens": 0.00012,
|
||||
"cache_read_input_token_cost": 3e-06,
|
||||
"cache_read_input_token_cost_above_272k_tokens": 6e-06,
|
||||
"input_cost_per_token": 3e-05,
|
||||
"input_cost_per_token_above_272k_tokens": 6e-05,
|
||||
"litellm_provider": "azure",
|
||||
"max_input_tokens": 1050000,
|
||||
"max_output_tokens": 128000,
|
||||
"max_tokens": 128000,
|
||||
"mode": "responses",
|
||||
"output_cost_per_token": 0.00036,
|
||||
"output_cost_per_token_above_272k_tokens": 0.00054,
|
||||
"output_cost_per_token": 0.00018,
|
||||
"output_cost_per_token_above_272k_tokens": 0.00027,
|
||||
"supported_endpoints": [
|
||||
"/v1/batch",
|
||||
"/v1/responses"
|
||||
|
|
@ -19912,21 +19912,21 @@
|
|||
"supports_minimal_reasoning_effort": true
|
||||
},
|
||||
"gpt-5.5-pro": {
|
||||
"cache_read_input_token_cost": 6e-06,
|
||||
"cache_read_input_token_cost_above_272k_tokens": 1.2e-05,
|
||||
"input_cost_per_token": 6e-05,
|
||||
"input_cost_per_token_above_272k_tokens": 0.00012,
|
||||
"input_cost_per_token_flex": 3e-05,
|
||||
"input_cost_per_token_batches": 3e-05,
|
||||
"cache_read_input_token_cost": 3e-06,
|
||||
"cache_read_input_token_cost_above_272k_tokens": 6e-06,
|
||||
"input_cost_per_token": 3e-05,
|
||||
"input_cost_per_token_above_272k_tokens": 6e-05,
|
||||
"input_cost_per_token_flex": 1.5e-05,
|
||||
"input_cost_per_token_batches": 1.5e-05,
|
||||
"litellm_provider": "openai",
|
||||
"max_input_tokens": 1050000,
|
||||
"max_output_tokens": 128000,
|
||||
"max_tokens": 128000,
|
||||
"mode": "responses",
|
||||
"output_cost_per_token": 0.00036,
|
||||
"output_cost_per_token_above_272k_tokens": 0.00054,
|
||||
"output_cost_per_token_flex": 0.00018,
|
||||
"output_cost_per_token_batches": 0.00018,
|
||||
"output_cost_per_token": 0.00018,
|
||||
"output_cost_per_token_above_272k_tokens": 0.00027,
|
||||
"output_cost_per_token_flex": 9e-05,
|
||||
"output_cost_per_token_batches": 9e-05,
|
||||
"supported_endpoints": [
|
||||
"/v1/responses",
|
||||
"/v1/batch"
|
||||
|
|
@ -19955,21 +19955,21 @@
|
|||
"supports_minimal_reasoning_effort": true
|
||||
},
|
||||
"gpt-5.5-pro-2026-04-23": {
|
||||
"cache_read_input_token_cost": 6e-06,
|
||||
"cache_read_input_token_cost_above_272k_tokens": 1.2e-05,
|
||||
"input_cost_per_token": 6e-05,
|
||||
"input_cost_per_token_above_272k_tokens": 0.00012,
|
||||
"input_cost_per_token_flex": 3e-05,
|
||||
"input_cost_per_token_batches": 3e-05,
|
||||
"cache_read_input_token_cost": 3e-06,
|
||||
"cache_read_input_token_cost_above_272k_tokens": 6e-06,
|
||||
"input_cost_per_token": 3e-05,
|
||||
"input_cost_per_token_above_272k_tokens": 6e-05,
|
||||
"input_cost_per_token_flex": 1.5e-05,
|
||||
"input_cost_per_token_batches": 1.5e-05,
|
||||
"litellm_provider": "openai",
|
||||
"max_input_tokens": 1050000,
|
||||
"max_output_tokens": 128000,
|
||||
"max_tokens": 128000,
|
||||
"mode": "responses",
|
||||
"output_cost_per_token": 0.00036,
|
||||
"output_cost_per_token_above_272k_tokens": 0.00054,
|
||||
"output_cost_per_token_flex": 0.00018,
|
||||
"output_cost_per_token_batches": 0.00018,
|
||||
"output_cost_per_token": 0.00018,
|
||||
"output_cost_per_token_above_272k_tokens": 0.00027,
|
||||
"output_cost_per_token_flex": 9e-05,
|
||||
"output_cost_per_token_batches": 9e-05,
|
||||
"supported_endpoints": [
|
||||
"/v1/responses",
|
||||
"/v1/batch"
|
||||
|
|
|
|||
|
|
@ -369,7 +369,7 @@ def test_generic_cost_per_token_gpt55():
|
|||
|
||||
|
||||
def test_generic_cost_per_token_gpt55_pro():
|
||||
"""gpt-5.5-pro: responses-only model — $60/1M input, $360/1M output, $6/1M cached input."""
|
||||
"""gpt-5.5-pro: responses-only model — $30/1M input, $180/1M output, $3/1M cached input."""
|
||||
model = "gpt-5.5-pro"
|
||||
custom_llm_provider = "openai"
|
||||
os.environ["LITELLM_LOCAL_MODEL_COST_MAP"] = "True"
|
||||
|
|
@ -378,18 +378,18 @@ def test_generic_cost_per_token_gpt55_pro():
|
|||
model_cost_map = litellm.model_cost[model]
|
||||
|
||||
# Sanity-check the map values match OpenAI's published pricing.
|
||||
assert model_cost_map["input_cost_per_token"] == 6e-5
|
||||
assert model_cost_map["output_cost_per_token"] == 3.6e-4
|
||||
assert model_cost_map["cache_read_input_token_cost"] == 6e-6
|
||||
assert model_cost_map["input_cost_per_token"] == 3e-5
|
||||
assert model_cost_map["output_cost_per_token"] == 1.8e-4
|
||||
assert model_cost_map["cache_read_input_token_cost"] == 3e-6
|
||||
assert model_cost_map["litellm_provider"] == "openai"
|
||||
# gpt-5.5-pro is a responses-only model (no /v1/chat/completions endpoint).
|
||||
assert model_cost_map["mode"] == "responses"
|
||||
assert "/v1/chat/completions" not in model_cost_map["supported_endpoints"]
|
||||
assert "/v1/responses" in model_cost_map["supported_endpoints"]
|
||||
# Inherits GPT-5.4-pro's long-context window + tiered pricing (scaled 2x).
|
||||
# Inherits GPT-5.4-pro's long-context window + tiered pricing.
|
||||
assert model_cost_map["max_input_tokens"] == 1050000
|
||||
assert model_cost_map["input_cost_per_token_above_272k_tokens"] == 1.2e-4
|
||||
assert model_cost_map["output_cost_per_token_above_272k_tokens"] == 5.4e-4
|
||||
assert model_cost_map["input_cost_per_token_above_272k_tokens"] == 6e-5
|
||||
assert model_cost_map["output_cost_per_token_above_272k_tokens"] == 2.7e-4
|
||||
|
||||
prompt_tokens = 1000
|
||||
completion_tokens = 500
|
||||
|
|
@ -454,8 +454,8 @@ def test_gpt55_dated_variants_match_base_reasoning_effort_capabilities(
|
|||
[
|
||||
("azure/gpt-5.5", "chat", 5e-6, 3e-5, 5e-7),
|
||||
("azure/gpt-5.5-2026-04-23", "chat", 5e-6, 3e-5, 5e-7),
|
||||
("azure/gpt-5.5-pro", "responses", 6e-5, 3.6e-4, 6e-6),
|
||||
("azure/gpt-5.5-pro-2026-04-23", "responses", 6e-5, 3.6e-4, 6e-6),
|
||||
("azure/gpt-5.5-pro", "responses", 3e-5, 1.8e-4, 3e-6),
|
||||
("azure/gpt-5.5-pro-2026-04-23", "responses", 3e-5, 1.8e-4, 3e-6),
|
||||
],
|
||||
)
|
||||
def test_azure_gpt55_entries_present_with_correct_pricing(
|
||||
|
|
@ -464,7 +464,7 @@ def test_azure_gpt55_entries_present_with_correct_pricing(
|
|||
"""Day-0 Azure entries for GPT-5.5 mirror the OpenAI pricing structure.
|
||||
|
||||
Pricing parity with openai/gpt-5.5* (verified against OpenAI's pricing page
|
||||
on 2026-04-24): $5/$30 input/output per 1M for chat, $60/$360 for pro.
|
||||
on 2026-04-24): $5/$30 input/output per 1M for chat, $30/$180 for pro.
|
||||
Cache discount is 10% of input.
|
||||
"""
|
||||
os.environ["LITELLM_LOCAL_MODEL_COST_MAP"] = "True"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue