The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix(proxy): use get_async_httpx_client for logo download (#20155)
shin-bot-litellm2f6d18e6bcab
diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.pyindex a00f1f605a9..ffa2da4cfbe 100644--- a/litellm/proxy/proxy_server.py+++ b/litellm/proxy/proxy_server.py@@ -10164,9 +10164,13 @@ async def get_image():if logo_path.startswith(("http://", "https://")):try:# Download the image and cache it- from litellm.llms.custom_httpx.http_handler import AsyncHTTPHandler+ from litellm.llms.custom_httpx.http_handler import get_async_httpx_client+ from litellm.types.llms.custom_http import httpxSpecialProvider- async_client = AsyncHTTPHandler(timeout=5.0)+ async_client = get_async_httpx_client(+ llm_provider=httpxSpecialProvider.UI,+ params={"timeout": 5.0},+ )response = await async_client.get(logo_path)if response.status_code == 200:# Save the image to a local filediff --git a/litellm/types/llms/custom_http.py b/litellm/types/llms/custom_http.pyindex ca348bad97c..32f3dc2efaf 100644--- a/litellm/types/llms/custom_http.py+++ b/litellm/types/llms/custom_http.py@@ -26,6 +26,7 @@ class httpxSpecialProvider(str, Enum):RAG = "rag"A2A = "a2a"PromptManagement = "prompt_management"+ UI = "ui"VerifyTypes = Union[str, bool, ssl.SSLContext]