From af5ae5a05c83f2b4bc07ba4af93d785c4f964461 Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Fri, 30 Oct 2026 12:40:00 -0700 Subject: [PATCH] fix(proxy): keep batch create working when the credentials lookup names no model --- litellm/proxy/hooks/batch_rate_limiter.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/litellm/proxy/hooks/batch_rate_limiter.py b/litellm/proxy/hooks/batch_rate_limiter.py index d0906579e00..d555748ce1b 100644 --- a/litellm/proxy/hooks/batch_rate_limiter.py +++ b/litellm/proxy/hooks/batch_rate_limiter.py @@ -246,9 +246,11 @@ class _PROXY_BatchRateLimiter(CustomLogger): ) except HTTPException: return MappingProxyType({}) - return MappingProxyType( - {batch_row_model_for_deployment(credentials["model"], credentials["custom_llm_provider"]): routing_alias} - ) + deployment_model: Final = credentials.get("model") + provider: Final = credentials.get("custom_llm_provider") + if not isinstance(deployment_model, str) or not isinstance(provider, str): + return MappingProxyType({}) + return MappingProxyType({batch_row_model_for_deployment(deployment_model, provider): routing_alias}) def _resolve_batch_provider(self, batch_model: str | None) -> str | None: """Resolve the provider from the deployment that serves ``batch_model``.