SSL, HTTP Proxy Security Settings
If you're in an environment using an older TTS bundle, with an older encryption, follow this guide.
LiteLLM uses HTTPX for network requests, unless otherwise specified.
1. Disable SSL verification​
- SDK
- PROXY
- Environment Variables
import litellm
litellm.ssl_verify = False
litellm_settings:
ssl_verify: false
export SSL_VERIFY="False"
2. Lower security settings​
- SDK
- PROXY
- Environment Variables
import litellm
litellm.ssl_security_level = 1
litellm.ssl_certificate = "/path/to/certificate.pem"
litellm_settings:
ssl_security_level: 1
ssl_certificate: "/path/to/certificate.pem"
export SSL_SECURITY_LEVEL="1"
export SSL_CERTIFICATE="/path/to/certificate.pem"
3. Use HTTP_PROXY environment variable​
Both httpx and aiohttp libraries use urllib.request.getproxies
from environment variables. Before client initialization, you may set proxy (and optional SSL_CERT_FILE) by setting the environment variables:
- SDK
- PROXY
import litellm
litellm.aiohttp_trust_env = True
export HTTPS_PROXY='http://username:password@proxy_uri:port'
export HTTPS_PROXY='http://username:password@proxy_uri:port'
export AIOHTTP_TRUST_ENV='True'