Merge branch 'litellm_dev_03_10_2025_p3' into litellm_router_client_init_migration

This commit is contained in:
Krish Dholakia 2025-03-11 18:27:56 -07:00 committed by GitHub
commit d2fde6b5aa
3 changed files with 21 additions and 94 deletions

View file

@ -5345,6 +5345,13 @@ class Router:
client = self.cache.get_cache(
key=cache_key, local_only=True, parent_otel_span=parent_otel_span
)
if client is None:
InitalizeOpenAISDKClient.set_max_parallel_requests_client(
litellm_router_instance=self, model=deployment
)
client = self.cache.get_cache(
key=cache_key, local_only=True, parent_otel_span=parent_otel_span
)
return client
elif client_type == "async":
if kwargs.get("stream") is True: