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]

refactor: clean up fresh tech debt from 2026-10-02 (#44362)

devin-ai-integration[bot]d260765652f7
diff --git a/enterprise/litellm_enterprise/proxy/hooks/managed_files.py b/enterprise/litellm_enterprise/proxy/hooks/managed_files.py
index 7129573c30c..8ca8857445c 100644
--- a/enterprise/litellm_enterprise/proxy/hooks/managed_files.py
+++ b/enterprise/litellm_enterprise/proxy/hooks/managed_files.py
@@ -54,7 +54,6 @@ from litellm.proxy.litellm_pre_call_utils import LiteLLMProxyRequestSetup
from litellm.proxy.openai_files_endpoints.common_utils import (
BATCH_CREATE_HIDDEN_PARAM,
FILE_LIST_CONTINUATION_CHUNK_SIZE,
- ManagedFileIdResolver,
_is_base64_encoded_unified_file_id,
apply_unified_file_ids,
decode_model_from_file_id,
diff --git a/litellm/litellm_core_utils/litellm_logging.py b/litellm/litellm_core_utils/litellm_logging.py
index 05393049f58..d8e70d3b125 100644
--- a/litellm/litellm_core_utils/litellm_logging.py
+++ b/litellm/litellm_core_utils/litellm_logging.py
@@ -2490,7 +2490,7 @@ class Logging(LiteLLMLoggingBaseClass):
response: ModelResponse | TextCompletionResponse | ResponsesAPIResponse | InteractionsAPIResponse,
) -> ModelResponse | TextCompletionResponse | ResponsesAPIResponse | InteractionsAPIResponse:
model: Final = self.client_facing_stream_model
- if model is None or getattr(response, "model", None) in (None, model):
+ if model is None or response.model in (None, model):
return response
return response.model_copy(update={"model": model})
diff --git a/litellm/llms/scaleway/rerank/transformation.py b/litellm/llms/scaleway/rerank/transformation.py
index 31f273bdc43..921252d7091 100644
--- a/litellm/llms/scaleway/rerank/transformation.py
+++ b/litellm/llms/scaleway/rerank/transformation.py
@@ -46,6 +46,5 @@ class ScalewayRerankConfig(JinaAIRerankConfig):
"content-type": "application/json",
"authorization": f"Bearer {key}",
}
- # Header names are case-insensitive, so match on the lowercase name.
caller_headers: Final = {name: value for name, value in headers.items() if name.lower() not in provider_headers}
return {**caller_headers, **provider_headers}
diff --git a/litellm/proxy/spend_tracking/background_interaction_settlement.py b/litellm/proxy/spend_tracking/background_interaction_settlement.py
index 716dc28565e..165f813cd50 100644
--- a/litellm/proxy/spend_tracking/background_interaction_settlement.py
+++ b/litellm/proxy/spend_tracking/background_interaction_settlement.py
@@ -84,10 +84,6 @@ class _SettlementTableActions(Protocol):
def update_many(self, *, data: _Claim | _Outcome, where: _RowKey | _UnclaimedRowKey) -> Awaitable[int]: ...
-def _settlement_table(prisma_client: "PrismaClient") -> _SettlementTableActions:
- return BackgroundInteractionSettlementRepository(prisma_client).table
-
-
_CLEARED_CREATE_CONTEXT: Final[Mapping[str, object]] = MappingProxyType({})
_T = TypeVar("_T")
diff --git a/litellm/utils.py b/litellm/utils.py
index 35fea4f5f4a..e398f4eaf8a 100644
--- a/litellm/utils.py
+++ b/litellm/utils.py
@@ -8862,7 +8862,6 @@ class ProviderConfigManager:
elif litellm.LlmProviders.INFINITY == provider:
return litellm.InfinityRerankConfig()
elif provider in (litellm.LlmProviders.JINA_AI, litellm.LlmProviders.SCALEWAY):
- # Scaleway's rerank API matches Jina's, so its config extends Jina's.
return (
litellm.ScalewayRerankConfig()
if provider == litellm.LlmProviders.SCALEWAY