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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix(utils.py): fix linting errors
Krrish Dholakiac65a438de247
diff --git a/litellm/router.py b/litellm/router.pyindex fcbd3a23075..108ca706c5f 100644--- a/litellm/router.py+++ b/litellm/router.py@@ -3865,6 +3865,7 @@ class Router:if supported_openai_params is None:supported_openai_params = []model_info = ModelMapInfo(+ key=model_group,max_tokens=None,max_input_tokens=None,max_output_tokens=None,diff --git a/litellm/utils.py b/litellm/utils.pyindex a32c67d0339..fe65e415b28 100644--- a/litellm/utils.py+++ b/litellm/utils.py@@ -2148,7 +2148,7 @@ def supports_parallel_function_calling(model: str):####### HELPER FUNCTIONS ################-def _update_dictionary(existing_dict: dict, new_dict: dict) -> dict:+def _update_dictionary(existing_dict: Dict, new_dict: dict) -> dict:for k, v in new_dict.items():existing_dict[k] = v@@ -2179,14 +2179,14 @@ def register_model(model_cost: Union[str, dict]):for key, value in loaded_model_cost.items():## get model info ##try:- existing_model = get_model_info(model=key)+ existing_model: Union[ModelInfo, dict] = get_model_info(model=key)model_cost_key = existing_model["key"]except Exception:existing_model = {}model_cost_key = key## override / add new keys to the existing model cost dictionarylitellm.model_cost.setdefault(model_cost_key, {}).update(- _update_dictionary(existing_model, value)+ _update_dictionary(existing_model, value) # type: ignore)verbose_logger.debug(f"{key} added to model cost map")# add new model names to provider lists