Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

Add new gpt-4.5-preview model + other updates (#8879)

Krish Dholakiaff553fedf81b
diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.json
index d1228afb80d..9296bfa4b46 100644
--- a/litellm/model_prices_and_context_window_backup.json
+++ b/litellm/model_prices_and_context_window_backup.json
@@ -76,6 +76,44 @@
"supports_system_messages": true,
"supports_tool_choice": true
},
+ "gpt-4.5-preview": {
+ "max_tokens": 16384,
+ "max_input_tokens": 128000,
+ "max_output_tokens": 16384,
+ "input_cost_per_token": 0.000075,
+ "output_cost_per_token": 0.00015,
+ "input_cost_per_token_batches": 0.0000375,
+ "output_cost_per_token_batches": 0.000075,
+ "cache_read_input_token_cost": 0.0000375,
+ "litellm_provider": "openai",
+ "mode": "chat",
+ "supports_function_calling": true,
+ "supports_parallel_function_calling": true,
+ "supports_response_schema": true,
+ "supports_vision": true,
+ "supports_prompt_caching": true,
+ "supports_system_messages": true,
+ "supports_tool_choice": true
+ },
+ "gpt-4.5-preview-2025-02-27": {
+ "max_tokens": 16384,
+ "max_input_tokens": 128000,
+ "max_output_tokens": 16384,
+ "input_cost_per_token": 0.000075,
+ "output_cost_per_token": 0.00015,
+ "input_cost_per_token_batches": 0.0000375,
+ "output_cost_per_token_batches": 0.000075,
+ "cache_read_input_token_cost": 0.0000375,
+ "litellm_provider": "openai",
+ "mode": "chat",
+ "supports_function_calling": true,
+ "supports_parallel_function_calling": true,
+ "supports_response_schema": true,
+ "supports_vision": true,
+ "supports_prompt_caching": true,
+ "supports_system_messages": true,
+ "supports_tool_choice": true
+ },
"gpt-4o-audio-preview": {
"max_tokens": 16384,
"max_input_tokens": 128000,
diff --git a/litellm/rerank_api/main.py b/litellm/rerank_api/main.py
index 6015f533c0a..ce8ae21c82b 100644
--- a/litellm/rerank_api/main.py
+++ b/litellm/rerank_api/main.py
@@ -187,7 +187,7 @@ def rerank( # noqa: PLR0915
optional_rerank_params=optional_rerank_params,
logging_obj=litellm_logging_obj,
timeout=optional_params.timeout,
- api_key=dynamic_api_key or optional_params.api_key,
+ api_key=api_key,
api_base=api_base,
_is_async=_is_async,
headers=headers or litellm.headers or {},
diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.json
index d1228afb80d..9296bfa4b46 100644
--- a/model_prices_and_context_window.json
+++ b/model_prices_and_context_window.json
@@ -76,6 +76,44 @@
"supports_system_messages": true,
"supports_tool_choice": true
},
+ "gpt-4.5-preview": {
+ "max_tokens": 16384,
+ "max_input_tokens": 128000,
+ "max_output_tokens": 16384,
+ "input_cost_per_token": 0.000075,
+ "output_cost_per_token": 0.00015,
+ "input_cost_per_token_batches": 0.0000375,
+ "output_cost_per_token_batches": 0.000075,
+ "cache_read_input_token_cost": 0.0000375,
+ "litellm_provider": "openai",
+ "mode": "chat",
+ "supports_function_calling": true,
+ "supports_parallel_function_calling": true,
+ "supports_response_schema": true,
+ "supports_vision": true,
+ "supports_prompt_caching": true,
+ "supports_system_messages": true,
+ "supports_tool_choice": true
+ },
+ "gpt-4.5-preview-2025-02-27": {
+ "max_tokens": 16384,
+ "max_input_tokens": 128000,
+ "max_output_tokens": 16384,
+ "input_cost_per_token": 0.000075,
+ "output_cost_per_token": 0.00015,
+ "input_cost_per_token_batches": 0.0000375,
+ "output_cost_per_token_batches": 0.000075,
+ "cache_read_input_token_cost": 0.0000375,
+ "litellm_provider": "openai",
+ "mode": "chat",
+ "supports_function_calling": true,
+ "supports_parallel_function_calling": true,
+ "supports_response_schema": true,
+ "supports_vision": true,
+ "supports_prompt_caching": true,
+ "supports_system_messages": true,
+ "supports_tool_choice": true
+ },
"gpt-4o-audio-preview": {
"max_tokens": 16384,
"max_input_tokens": 128000,