mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
fix(model_prices): correct regional processing uplift to gpt-5.4/5.5 series only (#31136)
* fix(model_prices): correct regional processing uplift assignment gpt-4.1, gpt-4o, gpt-5, and their variants were incorrectly carrying the 10% EU/US regional processing uplift multiplier. Per OpenAI's pricing docs, the uplift applies only to models released on or after 2026-03-05 (gpt-5.4 series and gpt-5.5 series). Removes the uplift from: gpt-4.1, gpt-4.1-mini, gpt-4.1-nano, gpt-4o, gpt-4o-2024-08-06, gpt-4o-2024-11-20, gpt-4o-mini, gpt-5, gpt-5-pro, gpt-5-mini, gpt-5-nano. Adds the uplift to: gpt-5.4, gpt-5.4-mini, gpt-5.4-nano, gpt-5.4-pro, gpt-5.5, gpt-5.5-pro. * fix(model_prices): apply same regional uplift correction to backup file * fix(model_prices): add regional uplift to date-versioned gpt-5.4/5.5 siblings * test(model_prices): update data residency tests to use gpt-5.4 as the uplift model The tests were using gpt-5 which no longer carries the regional processing uplift after correcting which models have it. Switch to gpt-5.4 (released 2026-03-05, the cutoff date) and add a regression parametrize covering all pre-cutoff models to pin that they stay uplift-free. * test(batches): use gpt-5.4 for data residency uplift assertion batch_cost_calculator's data residency uplift test still pinned gpt-5, which no longer carries the regional processing uplift after this change. Switch it to gpt-5.4 (the canonical post-cutoff uplift model), matching the llm_cost_calc test update. --------- Co-authored-by: mgalbato <37748295+mgalbato@users.noreply.github.com>
This commit is contained in:
parent
a8a1472428
commit
286169d39b
4 changed files with 76 additions and 54 deletions
|
|
@ -20350,8 +20350,6 @@
|
|||
"output_cost_per_token": 8e-06,
|
||||
"output_cost_per_token_batches": 4e-06,
|
||||
"output_cost_per_token_priority": 1.4e-05,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supported_endpoints": [
|
||||
"/v1/chat/completions",
|
||||
"/v1/batch",
|
||||
|
|
@ -20425,8 +20423,6 @@
|
|||
"output_cost_per_token": 1.6e-06,
|
||||
"output_cost_per_token_batches": 8e-07,
|
||||
"output_cost_per_token_priority": 2.8e-06,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supported_endpoints": [
|
||||
"/v1/chat/completions",
|
||||
"/v1/batch",
|
||||
|
|
@ -20500,8 +20496,6 @@
|
|||
"output_cost_per_token": 4e-07,
|
||||
"output_cost_per_token_batches": 2e-07,
|
||||
"output_cost_per_token_priority": 8e-07,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supported_endpoints": [
|
||||
"/v1/chat/completions",
|
||||
"/v1/batch",
|
||||
|
|
@ -20573,8 +20567,6 @@
|
|||
"output_cost_per_token": 1e-05,
|
||||
"output_cost_per_token_batches": 5e-06,
|
||||
"output_cost_per_token_priority": 1.7e-05,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supports_function_calling": true,
|
||||
"supports_parallel_function_calling": true,
|
||||
"supports_pdf_input": true,
|
||||
|
|
@ -20616,8 +20608,6 @@
|
|||
"mode": "chat",
|
||||
"output_cost_per_token": 1e-05,
|
||||
"output_cost_per_token_batches": 5e-06,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supports_function_calling": true,
|
||||
"supports_parallel_function_calling": true,
|
||||
"supports_pdf_input": true,
|
||||
|
|
@ -20639,8 +20629,6 @@
|
|||
"mode": "chat",
|
||||
"output_cost_per_token": 1e-05,
|
||||
"output_cost_per_token_batches": 5e-06,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supports_function_calling": true,
|
||||
"supports_parallel_function_calling": true,
|
||||
"supports_pdf_input": true,
|
||||
|
|
@ -20929,8 +20917,6 @@
|
|||
"output_cost_per_token": 6e-07,
|
||||
"output_cost_per_token_batches": 3e-07,
|
||||
"output_cost_per_token_priority": 1e-06,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supports_function_calling": true,
|
||||
"supports_parallel_function_calling": true,
|
||||
"supports_pdf_input": true,
|
||||
|
|
@ -21634,8 +21620,6 @@
|
|||
"output_cost_per_token": 1e-05,
|
||||
"output_cost_per_token_flex": 5e-06,
|
||||
"output_cost_per_token_priority": 2e-05,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supported_endpoints": [
|
||||
"/v1/chat/completions",
|
||||
"/v1/batch",
|
||||
|
|
@ -22029,6 +22013,8 @@
|
|||
"output_cost_per_token_flex": 1.5e-05,
|
||||
"output_cost_per_token_batches": 1.5e-05,
|
||||
"output_cost_per_token_priority": 6e-05,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supported_endpoints": [
|
||||
"/v1/chat/completions",
|
||||
"/v1/batch",
|
||||
|
|
@ -22077,6 +22063,8 @@
|
|||
"output_cost_per_token_flex": 1.5e-05,
|
||||
"output_cost_per_token_batches": 1.5e-05,
|
||||
"output_cost_per_token_priority": 6e-05,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supported_endpoints": [
|
||||
"/v1/chat/completions",
|
||||
"/v1/batch",
|
||||
|
|
@ -22121,6 +22109,8 @@
|
|||
"output_cost_per_token_above_272k_tokens": 0.00027,
|
||||
"output_cost_per_token_flex": 9e-05,
|
||||
"output_cost_per_token_batches": 9e-05,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supported_endpoints": [
|
||||
"/v1/responses",
|
||||
"/v1/batch"
|
||||
|
|
@ -22165,6 +22155,8 @@
|
|||
"output_cost_per_token_above_272k_tokens": 0.00027,
|
||||
"output_cost_per_token_flex": 9e-05,
|
||||
"output_cost_per_token_batches": 9e-05,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supported_endpoints": [
|
||||
"/v1/responses",
|
||||
"/v1/batch"
|
||||
|
|
@ -22213,6 +22205,8 @@
|
|||
"output_cost_per_token_flex": 7.5e-06,
|
||||
"output_cost_per_token_batches": 7.5e-06,
|
||||
"output_cost_per_token_priority": 3e-05,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supported_endpoints": [
|
||||
"/v1/chat/completions",
|
||||
"/v1/batch",
|
||||
|
|
@ -22260,6 +22254,8 @@
|
|||
"output_cost_per_token_flex": 7.5e-06,
|
||||
"output_cost_per_token_batches": 7.5e-06,
|
||||
"output_cost_per_token_priority": 3e-05,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supported_endpoints": [
|
||||
"/v1/chat/completions",
|
||||
"/v1/batch",
|
||||
|
|
@ -22300,6 +22296,8 @@
|
|||
"output_cost_per_token_above_272k_tokens": 0.00027,
|
||||
"output_cost_per_token_flex": 9e-05,
|
||||
"output_cost_per_token_batches": 9e-05,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supported_endpoints": [
|
||||
"/v1/responses",
|
||||
"/v1/batch"
|
||||
|
|
@ -22343,6 +22341,8 @@
|
|||
"output_cost_per_token_above_272k_tokens": 0.00027,
|
||||
"output_cost_per_token_flex": 9e-05,
|
||||
"output_cost_per_token_batches": 9e-05,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supported_endpoints": [
|
||||
"/v1/responses",
|
||||
"/v1/batch"
|
||||
|
|
@ -22388,6 +22388,8 @@
|
|||
"output_cost_per_token_flex": 2.25e-06,
|
||||
"output_cost_per_token_batches": 2.25e-06,
|
||||
"output_cost_per_token_priority": 9e-06,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supported_endpoints": [
|
||||
"/v1/chat/completions",
|
||||
"/v1/batch",
|
||||
|
|
@ -22434,6 +22436,8 @@
|
|||
"output_cost_per_token_flex": 2.25e-06,
|
||||
"output_cost_per_token_batches": 2.25e-06,
|
||||
"output_cost_per_token_priority": 9e-06,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supported_endpoints": [
|
||||
"/v1/chat/completions",
|
||||
"/v1/batch",
|
||||
|
|
@ -22477,6 +22481,8 @@
|
|||
"output_cost_per_token": 1.25e-06,
|
||||
"output_cost_per_token_flex": 6.25e-07,
|
||||
"output_cost_per_token_batches": 6.25e-07,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supported_endpoints": [
|
||||
"/v1/chat/completions",
|
||||
"/v1/batch",
|
||||
|
|
@ -22520,6 +22526,8 @@
|
|||
"output_cost_per_token": 1.25e-06,
|
||||
"output_cost_per_token_flex": 6.25e-07,
|
||||
"output_cost_per_token_batches": 6.25e-07,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supported_endpoints": [
|
||||
"/v1/chat/completions",
|
||||
"/v1/batch",
|
||||
|
|
@ -22558,8 +22566,6 @@
|
|||
"mode": "responses",
|
||||
"output_cost_per_token": 0.00012,
|
||||
"output_cost_per_token_batches": 6e-05,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supported_endpoints": [
|
||||
"/v1/batch",
|
||||
"/v1/responses"
|
||||
|
|
@ -22966,8 +22972,6 @@
|
|||
"output_cost_per_token": 2e-06,
|
||||
"output_cost_per_token_flex": 1e-06,
|
||||
"output_cost_per_token_priority": 3.6e-06,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supported_endpoints": [
|
||||
"/v1/chat/completions",
|
||||
"/v1/batch",
|
||||
|
|
@ -23049,8 +23053,6 @@
|
|||
"max_input_tokens": 272000,
|
||||
"max_output_tokens": 128000,
|
||||
"max_tokens": 128000,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"mode": "chat",
|
||||
"output_cost_per_token": 4e-07,
|
||||
"output_cost_per_token_flex": 2e-07,
|
||||
|
|
|
|||
|
|
@ -20358,8 +20358,6 @@
|
|||
"output_cost_per_token": 8e-06,
|
||||
"output_cost_per_token_batches": 4e-06,
|
||||
"output_cost_per_token_priority": 1.4e-05,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supported_endpoints": [
|
||||
"/v1/chat/completions",
|
||||
"/v1/batch",
|
||||
|
|
@ -20433,8 +20431,6 @@
|
|||
"output_cost_per_token": 1.6e-06,
|
||||
"output_cost_per_token_batches": 8e-07,
|
||||
"output_cost_per_token_priority": 2.8e-06,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supported_endpoints": [
|
||||
"/v1/chat/completions",
|
||||
"/v1/batch",
|
||||
|
|
@ -20508,8 +20504,6 @@
|
|||
"output_cost_per_token": 4e-07,
|
||||
"output_cost_per_token_batches": 2e-07,
|
||||
"output_cost_per_token_priority": 8e-07,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supported_endpoints": [
|
||||
"/v1/chat/completions",
|
||||
"/v1/batch",
|
||||
|
|
@ -20581,8 +20575,6 @@
|
|||
"output_cost_per_token": 1e-05,
|
||||
"output_cost_per_token_batches": 5e-06,
|
||||
"output_cost_per_token_priority": 1.7e-05,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supports_function_calling": true,
|
||||
"supports_parallel_function_calling": true,
|
||||
"supports_pdf_input": true,
|
||||
|
|
@ -20624,8 +20616,6 @@
|
|||
"mode": "chat",
|
||||
"output_cost_per_token": 1e-05,
|
||||
"output_cost_per_token_batches": 5e-06,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supports_function_calling": true,
|
||||
"supports_parallel_function_calling": true,
|
||||
"supports_pdf_input": true,
|
||||
|
|
@ -20647,8 +20637,6 @@
|
|||
"mode": "chat",
|
||||
"output_cost_per_token": 1e-05,
|
||||
"output_cost_per_token_batches": 5e-06,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supports_function_calling": true,
|
||||
"supports_parallel_function_calling": true,
|
||||
"supports_pdf_input": true,
|
||||
|
|
@ -20937,8 +20925,6 @@
|
|||
"output_cost_per_token": 6e-07,
|
||||
"output_cost_per_token_batches": 3e-07,
|
||||
"output_cost_per_token_priority": 1e-06,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supports_function_calling": true,
|
||||
"supports_parallel_function_calling": true,
|
||||
"supports_pdf_input": true,
|
||||
|
|
@ -21642,8 +21628,6 @@
|
|||
"output_cost_per_token": 1e-05,
|
||||
"output_cost_per_token_flex": 5e-06,
|
||||
"output_cost_per_token_priority": 2e-05,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supported_endpoints": [
|
||||
"/v1/chat/completions",
|
||||
"/v1/batch",
|
||||
|
|
@ -22037,6 +22021,8 @@
|
|||
"output_cost_per_token_flex": 1.5e-05,
|
||||
"output_cost_per_token_batches": 1.5e-05,
|
||||
"output_cost_per_token_priority": 6e-05,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supported_endpoints": [
|
||||
"/v1/chat/completions",
|
||||
"/v1/batch",
|
||||
|
|
@ -22085,6 +22071,8 @@
|
|||
"output_cost_per_token_flex": 1.5e-05,
|
||||
"output_cost_per_token_batches": 1.5e-05,
|
||||
"output_cost_per_token_priority": 6e-05,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supported_endpoints": [
|
||||
"/v1/chat/completions",
|
||||
"/v1/batch",
|
||||
|
|
@ -22129,6 +22117,8 @@
|
|||
"output_cost_per_token_above_272k_tokens": 0.00027,
|
||||
"output_cost_per_token_flex": 9e-05,
|
||||
"output_cost_per_token_batches": 9e-05,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supported_endpoints": [
|
||||
"/v1/responses",
|
||||
"/v1/batch"
|
||||
|
|
@ -22173,6 +22163,8 @@
|
|||
"output_cost_per_token_above_272k_tokens": 0.00027,
|
||||
"output_cost_per_token_flex": 9e-05,
|
||||
"output_cost_per_token_batches": 9e-05,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supported_endpoints": [
|
||||
"/v1/responses",
|
||||
"/v1/batch"
|
||||
|
|
@ -22221,6 +22213,8 @@
|
|||
"output_cost_per_token_flex": 7.5e-06,
|
||||
"output_cost_per_token_batches": 7.5e-06,
|
||||
"output_cost_per_token_priority": 3e-05,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supported_endpoints": [
|
||||
"/v1/chat/completions",
|
||||
"/v1/batch",
|
||||
|
|
@ -22268,6 +22262,8 @@
|
|||
"output_cost_per_token_flex": 7.5e-06,
|
||||
"output_cost_per_token_batches": 7.5e-06,
|
||||
"output_cost_per_token_priority": 3e-05,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supported_endpoints": [
|
||||
"/v1/chat/completions",
|
||||
"/v1/batch",
|
||||
|
|
@ -22308,6 +22304,8 @@
|
|||
"output_cost_per_token_above_272k_tokens": 0.00027,
|
||||
"output_cost_per_token_flex": 9e-05,
|
||||
"output_cost_per_token_batches": 9e-05,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supported_endpoints": [
|
||||
"/v1/responses",
|
||||
"/v1/batch"
|
||||
|
|
@ -22351,6 +22349,8 @@
|
|||
"output_cost_per_token_above_272k_tokens": 0.00027,
|
||||
"output_cost_per_token_flex": 9e-05,
|
||||
"output_cost_per_token_batches": 9e-05,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supported_endpoints": [
|
||||
"/v1/responses",
|
||||
"/v1/batch"
|
||||
|
|
@ -22396,6 +22396,8 @@
|
|||
"output_cost_per_token_flex": 2.25e-06,
|
||||
"output_cost_per_token_batches": 2.25e-06,
|
||||
"output_cost_per_token_priority": 9e-06,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supported_endpoints": [
|
||||
"/v1/chat/completions",
|
||||
"/v1/batch",
|
||||
|
|
@ -22442,6 +22444,8 @@
|
|||
"output_cost_per_token_flex": 2.25e-06,
|
||||
"output_cost_per_token_batches": 2.25e-06,
|
||||
"output_cost_per_token_priority": 9e-06,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supported_endpoints": [
|
||||
"/v1/chat/completions",
|
||||
"/v1/batch",
|
||||
|
|
@ -22485,6 +22489,8 @@
|
|||
"output_cost_per_token": 1.25e-06,
|
||||
"output_cost_per_token_flex": 6.25e-07,
|
||||
"output_cost_per_token_batches": 6.25e-07,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supported_endpoints": [
|
||||
"/v1/chat/completions",
|
||||
"/v1/batch",
|
||||
|
|
@ -22528,6 +22534,8 @@
|
|||
"output_cost_per_token": 1.25e-06,
|
||||
"output_cost_per_token_flex": 6.25e-07,
|
||||
"output_cost_per_token_batches": 6.25e-07,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supported_endpoints": [
|
||||
"/v1/chat/completions",
|
||||
"/v1/batch",
|
||||
|
|
@ -22566,8 +22574,6 @@
|
|||
"mode": "responses",
|
||||
"output_cost_per_token": 0.00012,
|
||||
"output_cost_per_token_batches": 6e-05,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supported_endpoints": [
|
||||
"/v1/batch",
|
||||
"/v1/responses"
|
||||
|
|
@ -22974,8 +22980,6 @@
|
|||
"output_cost_per_token": 2e-06,
|
||||
"output_cost_per_token_flex": 1e-06,
|
||||
"output_cost_per_token_priority": 3.6e-06,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"supported_endpoints": [
|
||||
"/v1/chat/completions",
|
||||
"/v1/batch",
|
||||
|
|
@ -23057,8 +23061,6 @@
|
|||
"max_input_tokens": 272000,
|
||||
"max_output_tokens": 128000,
|
||||
"max_tokens": 128000,
|
||||
"regional_processing_uplift_multiplier_eu": 1.10,
|
||||
"regional_processing_uplift_multiplier_us": 1.10,
|
||||
"mode": "chat",
|
||||
"output_cost_per_token": 4e-07,
|
||||
"output_cost_per_token_flex": 2e-07,
|
||||
|
|
|
|||
|
|
@ -159,12 +159,12 @@ def test_batch_cost_calculator_applies_data_residency_uplift(
|
|||
|
||||
base_prompt, base_completion = batch_cost_calculator(
|
||||
usage=usage,
|
||||
model="gpt-5",
|
||||
model="gpt-5.4",
|
||||
custom_llm_provider="openai",
|
||||
)
|
||||
regional_prompt, regional_completion = batch_cost_calculator(
|
||||
usage=usage,
|
||||
model="gpt-5",
|
||||
model="gpt-5.4",
|
||||
custom_llm_provider="openai",
|
||||
data_residency=data_residency,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1499,19 +1499,20 @@ def _local_model_cost_map():
|
|||
|
||||
@pytest.mark.parametrize("data_residency", ["eu", "us"])
|
||||
def test_data_residency_applies_uplift(data_residency, _local_model_cost_map):
|
||||
"""gpt-5 should apply the regional processing uplift multiplier when
|
||||
data_residency is set."""
|
||||
"""gpt-5.4 should apply the regional processing uplift multiplier when
|
||||
data_residency is set. gpt-5.4+ (released 2026-03-05) carry the 10% uplift;
|
||||
gpt-5 and older models do not."""
|
||||
from litellm.types.utils import Usage
|
||||
|
||||
usage = Usage(prompt_tokens=1000, completion_tokens=500, total_tokens=1500)
|
||||
|
||||
base = generic_cost_per_token(
|
||||
model="gpt-5",
|
||||
model="gpt-5.4",
|
||||
usage=usage,
|
||||
custom_llm_provider="openai",
|
||||
)
|
||||
regional = generic_cost_per_token(
|
||||
model="gpt-5",
|
||||
model="gpt-5.4",
|
||||
usage=usage,
|
||||
custom_llm_provider="openai",
|
||||
data_residency=data_residency,
|
||||
|
|
@ -1526,6 +1527,23 @@ def test_data_residency_applies_uplift(data_residency, _local_model_cost_map):
|
|||
assert regional[1] == pytest.approx(base[1] * 1.10, rel=1e-9)
|
||||
|
||||
|
||||
@pytest.mark.parametrize("model", ["gpt-5", "gpt-5-mini", "gpt-5-nano", "gpt-5-pro", "gpt-4o", "gpt-4.1"])
|
||||
def test_data_residency_no_uplift_for_pre_march_2026_models(model, _local_model_cost_map):
|
||||
"""Models released before 2026-03-05 must not have the regional uplift."""
|
||||
from litellm.types.utils import Usage
|
||||
|
||||
usage = Usage(prompt_tokens=1000, completion_tokens=500, total_tokens=1500)
|
||||
|
||||
base = generic_cost_per_token(model=model, usage=usage, custom_llm_provider="openai")
|
||||
regional = generic_cost_per_token(
|
||||
model=model, usage=usage, custom_llm_provider="openai", data_residency="eu"
|
||||
)
|
||||
|
||||
assert base == regional, (
|
||||
f"{model} should not have a regional uplift, but cost changed with data_residency"
|
||||
)
|
||||
|
||||
|
||||
def test_data_residency_no_uplift_for_unmarked_model(_local_model_cost_map):
|
||||
"""A model without a regional_processing_uplift_multiplier_* entry should
|
||||
fall back to base pricing, not error."""
|
||||
|
|
@ -1555,12 +1573,12 @@ def test_data_residency_none_no_uplift(_local_model_cost_map):
|
|||
usage = Usage(prompt_tokens=1000, completion_tokens=500, total_tokens=1500)
|
||||
|
||||
base = generic_cost_per_token(
|
||||
model="gpt-5",
|
||||
model="gpt-5.4",
|
||||
usage=usage,
|
||||
custom_llm_provider="openai",
|
||||
)
|
||||
explicit_none = generic_cost_per_token(
|
||||
model="gpt-5",
|
||||
model="gpt-5.4",
|
||||
usage=usage,
|
||||
custom_llm_provider="openai",
|
||||
data_residency=None,
|
||||
|
|
@ -1576,13 +1594,13 @@ def test_data_residency_composes_with_service_tier(_local_model_cost_map):
|
|||
usage = Usage(prompt_tokens=1000, completion_tokens=500, total_tokens=1500)
|
||||
|
||||
priority_base = generic_cost_per_token(
|
||||
model="gpt-5",
|
||||
model="gpt-5.4",
|
||||
usage=usage,
|
||||
custom_llm_provider="openai",
|
||||
service_tier="priority",
|
||||
)
|
||||
priority_eu = generic_cost_per_token(
|
||||
model="gpt-5",
|
||||
model="gpt-5.4",
|
||||
usage=usage,
|
||||
custom_llm_provider="openai",
|
||||
service_tier="priority",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue