@@ -12,15 +12,16 @@ def __init__(
12
12
timeout : Optional [Union [float , httpx .Timeout ]] = None ,
13
13
concurrent_limit = 1000 ,
14
14
):
15
- sync_proxy_mounts = None
16
15
async_proxy_mounts = None
17
16
# Check if the HTTP_PROXY and HTTPS_PROXY environment variables are set and use them accordingly.
18
17
http_proxy = os .getenv ("HTTP_PROXY" , None )
19
18
https_proxy = os .getenv ("HTTPS_PROXY" , None )
20
19
no_proxy = os .getenv ("NO_PROXY" , None )
21
20
ssl_verify = bool (os .getenv ("SSL_VERIFY" , litellm .ssl_verify ))
21
+ cert = os .getenv (
22
+ "SSL_CERTIFICATE" , litellm .ssl_certificate
23
+ ) # /path/to/client.pem
22
24
23
- sync_proxy_mounts = None
24
25
if http_proxy is not None and https_proxy is not None :
25
26
async_proxy_mounts = {
26
27
"http://" : httpx .AsyncHTTPTransport (proxy = httpx .Proxy (url = http_proxy )),
@@ -46,6 +47,7 @@ def __init__(
46
47
),
47
48
verify = ssl_verify ,
48
49
mounts = async_proxy_mounts ,
50
+ cert = cert ,
49
51
)
50
52
51
53
async def close (self ):
@@ -108,6 +110,9 @@ def __init__(
108
110
https_proxy = os .getenv ("HTTPS_PROXY" , None )
109
111
no_proxy = os .getenv ("NO_PROXY" , None )
110
112
ssl_verify = bool (os .getenv ("SSL_VERIFY" , litellm .ssl_verify ))
113
+ cert = os .getenv (
114
+ "SSL_CERTIFICATE" , litellm .ssl_certificate
115
+ ) # /path/to/client.pem
111
116
112
117
sync_proxy_mounts = None
113
118
if http_proxy is not None and https_proxy is not None :
@@ -132,6 +137,7 @@ def __init__(
132
137
),
133
138
verify = ssl_verify ,
134
139
mounts = sync_proxy_mounts ,
140
+ cert = cert ,
135
141
)
136
142
else :
137
143
self .client = client
0 commit comments