From c9b1a9772f821db3b02b39a32469732c06602acb Mon Sep 17 00:00:00 2001 From: pfolex Date: Wed, 28 Oct 2026 12:17:14 -0400 Subject: [PATCH] style(lint): annotate Final bindings (LIT010) and remove extra provider rebind (LIT011) --- litellm/cost_calculator.py | 2 -- litellm/llms/openai_like/chat/transformation.py | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/litellm/cost_calculator.py b/litellm/cost_calculator.py index 36f561e2553..ee25b56143e 100644 --- a/litellm/cost_calculator.py +++ b/litellm/cost_calculator.py @@ -1763,8 +1763,6 @@ def completion_cost( ) ) region_name = hidden_params.get("region_name", region_name) - elif candidate_pricing_provider or candidate_custom_llm_provider: - custom_llm_provider = candidate_pricing_provider or candidate_custom_llm_provider else: if model is None: diff --git a/litellm/llms/openai_like/chat/transformation.py b/litellm/llms/openai_like/chat/transformation.py index 5a7bd809e4d..7e6e5f91ee4 100644 --- a/litellm/llms/openai_like/chat/transformation.py +++ b/litellm/llms/openai_like/chat/transformation.py @@ -150,14 +150,14 @@ class OpenAILikeChatConfig(OpenAIGPTConfig): api_key: str | None = None, json_mode: bool | None = None, ) -> ModelResponse: - resolved_custom_llm_provider = ( + resolved_custom_llm_provider: Final = ( litellm_params.get("custom_llm_provider") if isinstance(litellm_params, dict) else None ) or ( model_response._hidden_params.get("custom_llm_provider") if isinstance(model_response._hidden_params, dict) else None ) - transformed_response = OpenAILikeChatConfig._transform_response( + transformed_response: Final = OpenAILikeChatConfig._transform_response( model=model, response=raw_response, model_response=model_response,