fix(litellm_pre_call_utils.py): handle dynamic keys via api correctly

This commit is contained in:
Krrish Dholakia 2024-08-21 13:36:33 -07:00
parent 842f6c54df
commit ac5c6c8751
5 changed files with 39 additions and 9 deletions

View file

@ -121,7 +121,7 @@ import importlib.metadata
from openai import OpenAIError as OriginalError
from ._logging import verbose_logger
from .caching import RedisCache, RedisSemanticCache, S3Cache, QdrantSemanticCache
from .caching import QdrantSemanticCache, RedisCache, RedisSemanticCache, S3Cache
from .exceptions import (
APIConnectionError,
APIError,
@ -8622,7 +8622,9 @@ def get_secret(
return secret_value_as_bool
else:
return secret
except:
except Exception:
if default_value is not None:
return default_value
return secret
except Exception as e:
if default_value is not None: