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(model_info): drop types import from fallback_generalizations

kerry4cf20f31ed00
diff --git a/litellm/litellm_core_utils/fallback_generalizations.py b/litellm/litellm_core_utils/fallback_generalizations.py
index 5565e557392..be432d1fdd4 100644
--- a/litellm/litellm_core_utils/fallback_generalizations.py
+++ b/litellm/litellm_core_utils/fallback_generalizations.py
@@ -55,7 +55,6 @@ import logging
import re
from collections.abc import Mapping
from dataclasses import dataclass
-from types import MappingProxyType
from typing import Final
verbose_logger: Final = logging.getLogger("LiteLLM")
@@ -225,9 +224,9 @@ class _FallbackGeneralizations:
)
if not matched:
return None
- fill_missing: Final[Mapping[str, object]] = MappingProxyType(
- {key: value for model_info in matched for key, value in model_info.items() if key != PROVIDER_KEY}
- )
+ fill_missing: Final[Mapping[str, object]] = {
+ key: value for model_info in matched for key, value in model_info.items() if key != PROVIDER_KEY
+ }
return fill_missing or None