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(proxy): narrow pass-through provider resolution to BadRequestError

mateo-berrif2049a7d9b63
diff --git a/litellm/proxy/pass_through_endpoints/passthrough_endpoint_router.py b/litellm/proxy/pass_through_endpoints/passthrough_endpoint_router.py
index dc53686b3cc..1d2b4504d61 100644
--- a/litellm/proxy/pass_through_endpoints/passthrough_endpoint_router.py
+++ b/litellm/proxy/pass_through_endpoints/passthrough_endpoint_router.py
@@ -116,7 +116,7 @@ class PassthroughEndpointRouter:
model=model,
custom_llm_provider=litellm_params.get("custom_llm_provider"),
)
- except Exception:
+ except litellm.exceptions.BadRequestError:
return None
return provider