(feat) control ssl_verify on litellm.router

This commit is contained in:
ishaan-jaff 2024-02-01 20:36:50 -08:00
parent f8e8c1f900
commit d9f74ef4a1
2 changed files with 13 additions and 1 deletions

View file

@ -55,6 +55,7 @@ baseten_key: Optional[str] = None
aleph_alpha_key: Optional[str] = None
nlp_cloud_key: Optional[str] = None
use_client: bool = False
ssl_verify: bool = True
logging: bool = True
caching: bool = False # Not used anymore, will be removed in next MAJOR release - https://github.com/BerriAI/litellm/discussions/648
caching_with_models: bool = False # # Not used anymore, will be removed in next MAJOR release - https://github.com/BerriAI/litellm/discussions/648

View file

@ -1407,7 +1407,6 @@ class Router:
max_retries = litellm.get_secret(max_retries_env_name)
litellm_params["max_retries"] = max_retries
# proxy support
import os
import httpx
@ -1463,6 +1462,7 @@ class Router:
limits=httpx.Limits(
max_connections=1000, max_keepalive_connections=100
),
verify=litellm.ssl_verify,
mounts=async_proxy_mounts,
), # type: ignore
)
@ -1485,6 +1485,7 @@ class Router:
limits=httpx.Limits(
max_connections=1000, max_keepalive_connections=100
),
verify=litellm.ssl_verify,
mounts=sync_proxy_mounts,
), # type: ignore
)
@ -1507,6 +1508,7 @@ class Router:
limits=httpx.Limits(
max_connections=1000, max_keepalive_connections=100
),
verify=litellm.ssl_verify,
mounts=async_proxy_mounts,
), # type: ignore
)
@ -1529,6 +1531,7 @@ class Router:
limits=httpx.Limits(
max_connections=1000, max_keepalive_connections=100
),
verify=litellm.ssl_verify,
mounts=sync_proxy_mounts,
), # type: ignore
)
@ -1565,6 +1568,7 @@ class Router:
limits=httpx.Limits(
max_connections=1000, max_keepalive_connections=100
),
verify=litellm.ssl_verify,
mounts=async_proxy_mounts,
), # type: ignore
)
@ -1585,6 +1589,7 @@ class Router:
limits=httpx.Limits(
max_connections=1000, max_keepalive_connections=100
),
verify=litellm.ssl_verify,
mounts=sync_proxy_mounts,
), # type: ignore
)
@ -1606,6 +1611,7 @@ class Router:
limits=httpx.Limits(
max_connections=1000, max_keepalive_connections=100
),
verify=litellm.ssl_verify,
mounts=async_proxy_mounts,
),
)
@ -1626,6 +1632,7 @@ class Router:
limits=httpx.Limits(
max_connections=1000, max_keepalive_connections=100
),
verify=litellm.ssl_verify,
mounts=sync_proxy_mounts,
),
)
@ -1652,6 +1659,7 @@ class Router:
limits=httpx.Limits(
max_connections=1000, max_keepalive_connections=100
),
verify=litellm.ssl_verify,
mounts=async_proxy_mounts,
), # type: ignore
)
@ -1674,6 +1682,7 @@ class Router:
limits=httpx.Limits(
max_connections=1000, max_keepalive_connections=100
),
verify=litellm.ssl_verify,
mounts=sync_proxy_mounts,
), # type: ignore
)
@ -1697,6 +1706,7 @@ class Router:
limits=httpx.Limits(
max_connections=1000, max_keepalive_connections=100
),
verify=litellm.ssl_verify,
mounts=async_proxy_mounts,
), # type: ignore
)
@ -1720,6 +1730,7 @@ class Router:
limits=httpx.Limits(
max_connections=1000, max_keepalive_connections=100
),
verify=litellm.ssl_verify,
mounts=sync_proxy_mounts,
), # type: ignore
)