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
refactor: Remove incomplete wildcard validation per maintainer feedback
Akiva Kraines31430156c7e9
diff --git a/litellm/router.py b/litellm/router.pyindex a040b3bfeaf..b709dc764c5 100644--- a/litellm/router.py+++ b/litellm/router.py@@ -5725,37 +5725,6 @@ class Router:return Truereturn False- def _validate_wildcard_deployments(self):- """Warn if multiple wildcard patterns exist for same provider with different credentials"""- provider_wildcards: Dict[str, List[Tuple[str, str]]] = {} # provider -> [(credential, deployment_id)]-- for deployment in self.model_list:- model_name = deployment.get('model_name', '')- if '*' in model_name:- # Extract provider from pattern (e.g., "openai/*" -> "openai")- provider = model_name.split('/')[0] if '/' in model_name else model_name.split('*')[0]-- litellm_params = deployment.get('litellm_params', {})- # Get credential identifier - use litellm_credential_name or first 10 chars of api_key- credential = litellm_params.get('litellm_credential_name') or \- (litellm_params.get('api_key', '')[:10] if litellm_params.get('api_key') else 'none')- deployment_id = deployment.get('model_info', {}).get('id', 'unknown')-- if provider not in provider_wildcards:- provider_wildcards[provider] = []- provider_wildcards[provider].append((credential, deployment_id))-- for provider, cred_deployment_pairs in provider_wildcards.items():- unique_credentials = set(cred for cred, _ in cred_deployment_pairs)- if len(unique_credentials) > 1:- deployment_ids = [dep_id for _, dep_id in cred_deployment_pairs]- verbose_router_logger.warning(- f"⚠️ Multiple wildcard deployments found for '{provider}/*' with different credentials ({len(unique_credentials)} credentials). "- f"This may cause non-deterministic authentication failures. "- f"Deployments: {len(cred_deployment_pairs)} ({deployment_ids[:3]}{'...' if len(deployment_ids) > 3 else ''}). "- f"Consider: 1) Using concrete model names, 2) Using one credential per provider, or 3) Using tag-based routing."- )-def set_model_list(self, model_list: list):original_model_list = copy.deepcopy(model_list)self.model_list = []@@ -5805,9 +5774,6 @@ class Router:# Note: model_name_to_deployment_indices is already built incrementally# by _create_deployment -> _add_model_to_list_and_index_map-- # Validate wildcard deployments after all models are loaded- self._validate_wildcard_deployments()def _add_deployment(self, deployment: Deployment) -> Deployment:import os