mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-02 07:13:02 +00:00
fix(proxy): keep batch create working when the credentials lookup names no model
This commit is contained in:
parent
0db47c24b8
commit
af5ae5a05c
1 changed files with 5 additions and 3 deletions
|
|
@ -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``.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue