Add new gpt-4.5-preview model + other updates (#8879)
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 14s

* fix(rerank): properly use LiteLLM api key when reranking through proxy (#8873)

`litellm.api_key` wasn't used as an option when calling the rerank API.
As a result, using rerank with custom_llm_provider="litellm_proxy" always
resulted in the following error:
Cohere API key is required. Please set 'COHERE_API_KEY' or 'CO_API_KEY' or 'litellm.cohere_key'

* feat(model_prices_and_context_window.json): add new gpt-4.5-preview model

---------

Co-authored-by: Enzo Aguado <enzo@aguado.me>
This commit is contained in:
Krish Dholakia 2025-02-27 15:27:14 -08:00 committed by GitHub
parent 88ef3b41b6
commit ff553fedf8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 77 additions and 1 deletions

View file

@ -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 {},