mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
(feat) control ssl_verify on litellm.router
This commit is contained in:
parent
f8e8c1f900
commit
d9f74ef4a1
2 changed files with 13 additions and 1 deletions
|
@ -55,6 +55,7 @@ baseten_key: Optional[str] = None
|
||||||
aleph_alpha_key: Optional[str] = None
|
aleph_alpha_key: Optional[str] = None
|
||||||
nlp_cloud_key: Optional[str] = None
|
nlp_cloud_key: Optional[str] = None
|
||||||
use_client: bool = False
|
use_client: bool = False
|
||||||
|
ssl_verify: bool = True
|
||||||
logging: 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: 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
|
caching_with_models: bool = False # # Not used anymore, will be removed in next MAJOR release - https://github.com/BerriAI/litellm/discussions/648
|
||||||
|
|
|
@ -1407,7 +1407,6 @@ class Router:
|
||||||
max_retries = litellm.get_secret(max_retries_env_name)
|
max_retries = litellm.get_secret(max_retries_env_name)
|
||||||
litellm_params["max_retries"] = max_retries
|
litellm_params["max_retries"] = max_retries
|
||||||
|
|
||||||
|
|
||||||
# proxy support
|
# proxy support
|
||||||
import os
|
import os
|
||||||
import httpx
|
import httpx
|
||||||
|
@ -1463,6 +1462,7 @@ class Router:
|
||||||
limits=httpx.Limits(
|
limits=httpx.Limits(
|
||||||
max_connections=1000, max_keepalive_connections=100
|
max_connections=1000, max_keepalive_connections=100
|
||||||
),
|
),
|
||||||
|
verify=litellm.ssl_verify,
|
||||||
mounts=async_proxy_mounts,
|
mounts=async_proxy_mounts,
|
||||||
), # type: ignore
|
), # type: ignore
|
||||||
)
|
)
|
||||||
|
@ -1485,6 +1485,7 @@ class Router:
|
||||||
limits=httpx.Limits(
|
limits=httpx.Limits(
|
||||||
max_connections=1000, max_keepalive_connections=100
|
max_connections=1000, max_keepalive_connections=100
|
||||||
),
|
),
|
||||||
|
verify=litellm.ssl_verify,
|
||||||
mounts=sync_proxy_mounts,
|
mounts=sync_proxy_mounts,
|
||||||
), # type: ignore
|
), # type: ignore
|
||||||
)
|
)
|
||||||
|
@ -1507,6 +1508,7 @@ class Router:
|
||||||
limits=httpx.Limits(
|
limits=httpx.Limits(
|
||||||
max_connections=1000, max_keepalive_connections=100
|
max_connections=1000, max_keepalive_connections=100
|
||||||
),
|
),
|
||||||
|
verify=litellm.ssl_verify,
|
||||||
mounts=async_proxy_mounts,
|
mounts=async_proxy_mounts,
|
||||||
), # type: ignore
|
), # type: ignore
|
||||||
)
|
)
|
||||||
|
@ -1529,6 +1531,7 @@ class Router:
|
||||||
limits=httpx.Limits(
|
limits=httpx.Limits(
|
||||||
max_connections=1000, max_keepalive_connections=100
|
max_connections=1000, max_keepalive_connections=100
|
||||||
),
|
),
|
||||||
|
verify=litellm.ssl_verify,
|
||||||
mounts=sync_proxy_mounts,
|
mounts=sync_proxy_mounts,
|
||||||
), # type: ignore
|
), # type: ignore
|
||||||
)
|
)
|
||||||
|
@ -1565,6 +1568,7 @@ class Router:
|
||||||
limits=httpx.Limits(
|
limits=httpx.Limits(
|
||||||
max_connections=1000, max_keepalive_connections=100
|
max_connections=1000, max_keepalive_connections=100
|
||||||
),
|
),
|
||||||
|
verify=litellm.ssl_verify,
|
||||||
mounts=async_proxy_mounts,
|
mounts=async_proxy_mounts,
|
||||||
), # type: ignore
|
), # type: ignore
|
||||||
)
|
)
|
||||||
|
@ -1585,6 +1589,7 @@ class Router:
|
||||||
limits=httpx.Limits(
|
limits=httpx.Limits(
|
||||||
max_connections=1000, max_keepalive_connections=100
|
max_connections=1000, max_keepalive_connections=100
|
||||||
),
|
),
|
||||||
|
verify=litellm.ssl_verify,
|
||||||
mounts=sync_proxy_mounts,
|
mounts=sync_proxy_mounts,
|
||||||
), # type: ignore
|
), # type: ignore
|
||||||
)
|
)
|
||||||
|
@ -1606,6 +1611,7 @@ class Router:
|
||||||
limits=httpx.Limits(
|
limits=httpx.Limits(
|
||||||
max_connections=1000, max_keepalive_connections=100
|
max_connections=1000, max_keepalive_connections=100
|
||||||
),
|
),
|
||||||
|
verify=litellm.ssl_verify,
|
||||||
mounts=async_proxy_mounts,
|
mounts=async_proxy_mounts,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
@ -1626,6 +1632,7 @@ class Router:
|
||||||
limits=httpx.Limits(
|
limits=httpx.Limits(
|
||||||
max_connections=1000, max_keepalive_connections=100
|
max_connections=1000, max_keepalive_connections=100
|
||||||
),
|
),
|
||||||
|
verify=litellm.ssl_verify,
|
||||||
mounts=sync_proxy_mounts,
|
mounts=sync_proxy_mounts,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
@ -1652,6 +1659,7 @@ class Router:
|
||||||
limits=httpx.Limits(
|
limits=httpx.Limits(
|
||||||
max_connections=1000, max_keepalive_connections=100
|
max_connections=1000, max_keepalive_connections=100
|
||||||
),
|
),
|
||||||
|
verify=litellm.ssl_verify,
|
||||||
mounts=async_proxy_mounts,
|
mounts=async_proxy_mounts,
|
||||||
), # type: ignore
|
), # type: ignore
|
||||||
)
|
)
|
||||||
|
@ -1674,6 +1682,7 @@ class Router:
|
||||||
limits=httpx.Limits(
|
limits=httpx.Limits(
|
||||||
max_connections=1000, max_keepalive_connections=100
|
max_connections=1000, max_keepalive_connections=100
|
||||||
),
|
),
|
||||||
|
verify=litellm.ssl_verify,
|
||||||
mounts=sync_proxy_mounts,
|
mounts=sync_proxy_mounts,
|
||||||
), # type: ignore
|
), # type: ignore
|
||||||
)
|
)
|
||||||
|
@ -1697,6 +1706,7 @@ class Router:
|
||||||
limits=httpx.Limits(
|
limits=httpx.Limits(
|
||||||
max_connections=1000, max_keepalive_connections=100
|
max_connections=1000, max_keepalive_connections=100
|
||||||
),
|
),
|
||||||
|
verify=litellm.ssl_verify,
|
||||||
mounts=async_proxy_mounts,
|
mounts=async_proxy_mounts,
|
||||||
), # type: ignore
|
), # type: ignore
|
||||||
)
|
)
|
||||||
|
@ -1720,6 +1730,7 @@ class Router:
|
||||||
limits=httpx.Limits(
|
limits=httpx.Limits(
|
||||||
max_connections=1000, max_keepalive_connections=100
|
max_connections=1000, max_keepalive_connections=100
|
||||||
),
|
),
|
||||||
|
verify=litellm.ssl_verify,
|
||||||
mounts=sync_proxy_mounts,
|
mounts=sync_proxy_mounts,
|
||||||
), # type: ignore
|
), # type: ignore
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue