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]

fix route llm request to allow non-router models

Ishaan Jaff6742d3cb10ea
diff --git a/litellm/proxy/route_llm_request.py b/litellm/proxy/route_llm_request.py
index ac9332b219b..d5c2e2c087d 100644
--- a/litellm/proxy/route_llm_request.py
+++ b/litellm/proxy/route_llm_request.py
@@ -94,9 +94,7 @@ async def route_request(
)
elif data["model"] not in router_model_names:
- if llm_router.router_general_settings.pass_through_all_models:
- return getattr(litellm, f"{route_type}")(**data)
- elif (
+ if (
llm_router.default_deployment is not None
or len(llm_router.pattern_router.patterns) > 0
):
@@ -104,6 +102,8 @@ async def route_request(
elif route_type == "amoderation":
# moderation endpoint does not require `model` parameter
return getattr(llm_router, f"{route_type}")(**data)
+ else:
+ return getattr(litellm, f"{route_type}")(**data)
elif user_model is not None:
return getattr(litellm, f"{route_type}")(**data)