Skip to content

Commit fb3dd0f

Browse files
authored
Merge pull request #37722 from BerriAI/litellm_gpt56_max_input_tokens
fix(model-costs): correct gpt-5.6 max input tokens to 922k
2 parents cc812cd + 6bb677d commit fb3dd0f

3 files changed

Lines changed: 34 additions & 33 deletions

File tree

litellm/model_prices_and_context_window_backup.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6510,7 +6510,7 @@
65106510
"input_cost_per_token_priority": 1e-05,
65116511
"input_cost_per_token_above_272k_tokens_priority": 2e-05,
65126512
"litellm_provider": "azure",
6513-
"max_input_tokens": 1050000,
6513+
"max_input_tokens": 922000,
65146514
"max_output_tokens": 128000,
65156515
"max_tokens": 128000,
65166516
"mode": "chat",
@@ -6561,7 +6561,7 @@
65616561
"input_cost_per_token_priority": 1e-05,
65626562
"input_cost_per_token_above_272k_tokens_priority": 2e-05,
65636563
"litellm_provider": "azure",
6564-
"max_input_tokens": 1050000,
6564+
"max_input_tokens": 922000,
65656565
"max_output_tokens": 128000,
65666566
"max_tokens": 128000,
65676567
"mode": "chat",
@@ -6612,7 +6612,7 @@
66126612
"input_cost_per_token_priority": 4e-06,
66136613
"input_cost_per_token_above_272k_tokens_priority": 8e-06,
66146614
"litellm_provider": "azure",
6615-
"max_input_tokens": 1050000,
6615+
"max_input_tokens": 922000,
66166616
"max_output_tokens": 128000,
66176617
"max_tokens": 128000,
66186618
"mode": "chat",
@@ -6663,7 +6663,7 @@
66636663
"input_cost_per_token_priority": 4e-07,
66646664
"input_cost_per_token_above_272k_tokens_priority": 8e-07,
66656665
"litellm_provider": "azure",
6666-
"max_input_tokens": 1050000,
6666+
"max_input_tokens": 922000,
66676667
"max_output_tokens": 128000,
66686668
"max_tokens": 128000,
66696669
"mode": "chat",
@@ -6711,7 +6711,7 @@
67116711
"input_cost_per_token_above_272k_tokens": 1.1e-05,
67126712
"input_cost_per_token_priority": 1.375e-05,
67136713
"litellm_provider": "azure",
6714-
"max_input_tokens": 1050000,
6714+
"max_input_tokens": 922000,
67156715
"max_output_tokens": 128000,
67166716
"max_tokens": 128000,
67176717
"mode": "chat",
@@ -6759,7 +6759,7 @@
67596759
"input_cost_per_token_above_272k_tokens": 1.1e-05,
67606760
"input_cost_per_token_priority": 1.375e-05,
67616761
"litellm_provider": "azure",
6762-
"max_input_tokens": 1050000,
6762+
"max_input_tokens": 922000,
67636763
"max_output_tokens": 128000,
67646764
"max_tokens": 128000,
67656765
"mode": "chat",
@@ -6807,7 +6807,7 @@
68076807
"input_cost_per_token_above_272k_tokens": 4.4e-06,
68086808
"input_cost_per_token_priority": 5.5e-06,
68096809
"litellm_provider": "azure",
6810-
"max_input_tokens": 1050000,
6810+
"max_input_tokens": 922000,
68116811
"max_output_tokens": 128000,
68126812
"max_tokens": 128000,
68136813
"mode": "chat",
@@ -6855,7 +6855,7 @@
68556855
"input_cost_per_token_above_272k_tokens": 4.4e-07,
68566856
"input_cost_per_token_priority": 5.5e-07,
68576857
"litellm_provider": "azure",
6858-
"max_input_tokens": 1050000,
6858+
"max_input_tokens": 922000,
68596859
"max_output_tokens": 128000,
68606860
"max_tokens": 128000,
68616861
"mode": "chat",
@@ -6902,7 +6902,7 @@
69026902
"input_cost_per_token_above_272k_tokens": 1.1e-05,
69036903
"input_cost_per_token_priority": 1.375e-05,
69046904
"litellm_provider": "azure",
6905-
"max_input_tokens": 1050000,
6905+
"max_input_tokens": 922000,
69066906
"max_output_tokens": 128000,
69076907
"max_tokens": 128000,
69086908
"mode": "chat",
@@ -6950,7 +6950,7 @@
69506950
"input_cost_per_token_above_272k_tokens": 1.1e-05,
69516951
"input_cost_per_token_priority": 1.375e-05,
69526952
"litellm_provider": "azure",
6953-
"max_input_tokens": 1050000,
6953+
"max_input_tokens": 922000,
69546954
"max_output_tokens": 128000,
69556955
"max_tokens": 128000,
69566956
"mode": "chat",
@@ -6998,7 +6998,7 @@
69986998
"input_cost_per_token_above_272k_tokens": 4.4e-06,
69996999
"input_cost_per_token_priority": 5.5e-06,
70007000
"litellm_provider": "azure",
7001-
"max_input_tokens": 1050000,
7001+
"max_input_tokens": 922000,
70027002
"max_output_tokens": 128000,
70037003
"max_tokens": 128000,
70047004
"mode": "chat",
@@ -7046,7 +7046,7 @@
70467046
"input_cost_per_token_above_272k_tokens": 4.4e-07,
70477047
"input_cost_per_token_priority": 5.5e-07,
70487048
"litellm_provider": "azure",
7049-
"max_input_tokens": 1050000,
7049+
"max_input_tokens": 922000,
70507050
"max_output_tokens": 128000,
70517051
"max_tokens": 128000,
70527052
"mode": "chat",
@@ -25333,7 +25333,7 @@
2533325333
"input_cost_per_token_flex": 2.5e-06,
2533425334
"input_cost_per_token_priority": 1e-05,
2533525335
"litellm_provider": "openai",
25336-
"max_input_tokens": 1050000,
25336+
"max_input_tokens": 922000,
2533725337
"max_output_tokens": 128000,
2533825338
"max_tokens": 128000,
2533925339
"mode": "chat",
@@ -25396,7 +25396,7 @@
2539625396
"input_cost_per_token_flex": 2.5e-06,
2539725397
"input_cost_per_token_priority": 1e-05,
2539825398
"litellm_provider": "openai",
25399-
"max_input_tokens": 1050000,
25399+
"max_input_tokens": 922000,
2540025400
"max_output_tokens": 128000,
2540125401
"max_tokens": 128000,
2540225402
"mode": "chat",
@@ -25459,7 +25459,7 @@
2545925459
"input_cost_per_token_flex": 1e-06,
2546025460
"input_cost_per_token_priority": 4e-06,
2546125461
"litellm_provider": "openai",
25462-
"max_input_tokens": 1050000,
25462+
"max_input_tokens": 922000,
2546325463
"max_output_tokens": 128000,
2546425464
"max_tokens": 128000,
2546525465
"mode": "chat",
@@ -25522,7 +25522,7 @@
2552225522
"input_cost_per_token_flex": 1e-07,
2552325523
"input_cost_per_token_priority": 4e-07,
2552425524
"litellm_provider": "openai",
25525-
"max_input_tokens": 1050000,
25525+
"max_input_tokens": 922000,
2552625526
"max_output_tokens": 128000,
2552725527
"max_tokens": 128000,
2552825528
"mode": "chat",

model_prices_and_context_window.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6510,7 +6510,7 @@
65106510
"input_cost_per_token_priority": 1e-05,
65116511
"input_cost_per_token_above_272k_tokens_priority": 2e-05,
65126512
"litellm_provider": "azure",
6513-
"max_input_tokens": 1050000,
6513+
"max_input_tokens": 922000,
65146514
"max_output_tokens": 128000,
65156515
"max_tokens": 128000,
65166516
"mode": "chat",
@@ -6561,7 +6561,7 @@
65616561
"input_cost_per_token_priority": 1e-05,
65626562
"input_cost_per_token_above_272k_tokens_priority": 2e-05,
65636563
"litellm_provider": "azure",
6564-
"max_input_tokens": 1050000,
6564+
"max_input_tokens": 922000,
65656565
"max_output_tokens": 128000,
65666566
"max_tokens": 128000,
65676567
"mode": "chat",
@@ -6612,7 +6612,7 @@
66126612
"input_cost_per_token_priority": 4e-06,
66136613
"input_cost_per_token_above_272k_tokens_priority": 8e-06,
66146614
"litellm_provider": "azure",
6615-
"max_input_tokens": 1050000,
6615+
"max_input_tokens": 922000,
66166616
"max_output_tokens": 128000,
66176617
"max_tokens": 128000,
66186618
"mode": "chat",
@@ -6663,7 +6663,7 @@
66636663
"input_cost_per_token_priority": 4e-07,
66646664
"input_cost_per_token_above_272k_tokens_priority": 8e-07,
66656665
"litellm_provider": "azure",
6666-
"max_input_tokens": 1050000,
6666+
"max_input_tokens": 922000,
66676667
"max_output_tokens": 128000,
66686668
"max_tokens": 128000,
66696669
"mode": "chat",
@@ -6711,7 +6711,7 @@
67116711
"input_cost_per_token_above_272k_tokens": 1.1e-05,
67126712
"input_cost_per_token_priority": 1.375e-05,
67136713
"litellm_provider": "azure",
6714-
"max_input_tokens": 1050000,
6714+
"max_input_tokens": 922000,
67156715
"max_output_tokens": 128000,
67166716
"max_tokens": 128000,
67176717
"mode": "chat",
@@ -6759,7 +6759,7 @@
67596759
"input_cost_per_token_above_272k_tokens": 1.1e-05,
67606760
"input_cost_per_token_priority": 1.375e-05,
67616761
"litellm_provider": "azure",
6762-
"max_input_tokens": 1050000,
6762+
"max_input_tokens": 922000,
67636763
"max_output_tokens": 128000,
67646764
"max_tokens": 128000,
67656765
"mode": "chat",
@@ -6807,7 +6807,7 @@
68076807
"input_cost_per_token_above_272k_tokens": 4.4e-06,
68086808
"input_cost_per_token_priority": 5.5e-06,
68096809
"litellm_provider": "azure",
6810-
"max_input_tokens": 1050000,
6810+
"max_input_tokens": 922000,
68116811
"max_output_tokens": 128000,
68126812
"max_tokens": 128000,
68136813
"mode": "chat",
@@ -6855,7 +6855,7 @@
68556855
"input_cost_per_token_above_272k_tokens": 4.4e-07,
68566856
"input_cost_per_token_priority": 5.5e-07,
68576857
"litellm_provider": "azure",
6858-
"max_input_tokens": 1050000,
6858+
"max_input_tokens": 922000,
68596859
"max_output_tokens": 128000,
68606860
"max_tokens": 128000,
68616861
"mode": "chat",
@@ -6902,7 +6902,7 @@
69026902
"input_cost_per_token_above_272k_tokens": 1.1e-05,
69036903
"input_cost_per_token_priority": 1.375e-05,
69046904
"litellm_provider": "azure",
6905-
"max_input_tokens": 1050000,
6905+
"max_input_tokens": 922000,
69066906
"max_output_tokens": 128000,
69076907
"max_tokens": 128000,
69086908
"mode": "chat",
@@ -6950,7 +6950,7 @@
69506950
"input_cost_per_token_above_272k_tokens": 1.1e-05,
69516951
"input_cost_per_token_priority": 1.375e-05,
69526952
"litellm_provider": "azure",
6953-
"max_input_tokens": 1050000,
6953+
"max_input_tokens": 922000,
69546954
"max_output_tokens": 128000,
69556955
"max_tokens": 128000,
69566956
"mode": "chat",
@@ -6998,7 +6998,7 @@
69986998
"input_cost_per_token_above_272k_tokens": 4.4e-06,
69996999
"input_cost_per_token_priority": 5.5e-06,
70007000
"litellm_provider": "azure",
7001-
"max_input_tokens": 1050000,
7001+
"max_input_tokens": 922000,
70027002
"max_output_tokens": 128000,
70037003
"max_tokens": 128000,
70047004
"mode": "chat",
@@ -7046,7 +7046,7 @@
70467046
"input_cost_per_token_above_272k_tokens": 4.4e-07,
70477047
"input_cost_per_token_priority": 5.5e-07,
70487048
"litellm_provider": "azure",
7049-
"max_input_tokens": 1050000,
7049+
"max_input_tokens": 922000,
70507050
"max_output_tokens": 128000,
70517051
"max_tokens": 128000,
70527052
"mode": "chat",
@@ -25333,7 +25333,7 @@
2533325333
"input_cost_per_token_flex": 2.5e-06,
2533425334
"input_cost_per_token_priority": 1e-05,
2533525335
"litellm_provider": "openai",
25336-
"max_input_tokens": 1050000,
25336+
"max_input_tokens": 922000,
2533725337
"max_output_tokens": 128000,
2533825338
"max_tokens": 128000,
2533925339
"mode": "chat",
@@ -25396,7 +25396,7 @@
2539625396
"input_cost_per_token_flex": 2.5e-06,
2539725397
"input_cost_per_token_priority": 1e-05,
2539825398
"litellm_provider": "openai",
25399-
"max_input_tokens": 1050000,
25399+
"max_input_tokens": 922000,
2540025400
"max_output_tokens": 128000,
2540125401
"max_tokens": 128000,
2540225402
"mode": "chat",
@@ -25459,7 +25459,7 @@
2545925459
"input_cost_per_token_flex": 1e-06,
2546025460
"input_cost_per_token_priority": 4e-06,
2546125461
"litellm_provider": "openai",
25462-
"max_input_tokens": 1050000,
25462+
"max_input_tokens": 922000,
2546325463
"max_output_tokens": 128000,
2546425464
"max_tokens": 128000,
2546525465
"mode": "chat",
@@ -25522,7 +25522,7 @@
2552225522
"input_cost_per_token_flex": 1e-07,
2552325523
"input_cost_per_token_priority": 4e-07,
2552425524
"litellm_provider": "openai",
25525-
"max_input_tokens": 1050000,
25525+
"max_input_tokens": 922000,
2552625526
"max_output_tokens": 128000,
2552725527
"max_tokens": 128000,
2552825528
"mode": "chat",

tests/test_litellm/litellm_core_utils/llm_cost_calc/test_llm_cost_calc_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,7 @@ def test_generic_cost_per_token_gpt56(
941941
assert model_cost_map["cache_creation_input_token_cost"] == pytest.approx(
942942
input_cost * 1.25
943943
)
944-
assert model_cost_map["max_input_tokens"] == 1050000
944+
assert model_cost_map["max_input_tokens"] == 922000
945945
assert model_cost_map["input_cost_per_token_above_272k_tokens"] == pytest.approx(
946946
input_cost * 2
947947
)
@@ -1082,6 +1082,7 @@ def test_generic_cost_per_token_azure_gpt56(
10821082
assert model_cost_map["input_cost_per_token"] == input_cost
10831083
assert model_cost_map["output_cost_per_token"] == output_cost
10841084
assert model_cost_map["cache_read_input_token_cost"] == cache_read_cost
1085+
assert model_cost_map["max_input_tokens"] == 922000
10851086

10861087
prompt_tokens = 1000
10871088
completion_tokens = 500

0 commit comments

Comments
 (0)