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]

chore(router): drop unreachable unknown-model error branch

user9b4442c6df65
diff --git a/litellm/router.py b/litellm/router.py
index 8abdd60ccad..2d66bc3158d 100644
--- a/litellm/router.py
+++ b/litellm/router.py
@@ -10031,10 +10031,7 @@ class Router:
# If still no deployments after checking for fallbacks, raise an error
if len(healthy_deployments) == 0:
- if self.get_model_list(model_name=model) is None:
- message = f"You passed in model={model}. There is no 'model_name' with this string"
- else:
- message = f"You passed in model={model}. There are no healthy deployments for this model"
+ message = f"You passed in model={model}. There are no healthy deployments for this model"
raise litellm.BadRequestError(
message=message,