feat(credential_accessor.py): support loading in credentials from credential_list

Resolves https://github.com/BerriAI/litellm/issues/9114
This commit is contained in:
Krrish Dholakia 2025-03-10 17:15:58 -07:00
parent 236e68910c
commit e518e3558b
5 changed files with 46 additions and 13 deletions

View file

@ -5370,18 +5370,18 @@ class Router:
client = self.cache.get_cache(
key=cache_key, local_only=True, parent_otel_span=parent_otel_span
)
if client is None:
"""
Re-initialize the client
"""
InitalizeOpenAISDKClient.set_client(
litellm_router_instance=self, model=deployment
)
client = self.cache.get_cache(
key=cache_key,
local_only=True,
parent_otel_span=parent_otel_span,
)
# if client is None:
# """
# Re-initialize the client
# """
# InitalizeOpenAISDKClient.set_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
else:
if kwargs.get("stream") is True: