From dad9579a65e07155e5e79023b93024840c26ea11 Mon Sep 17 00:00:00 2001 From: Yuan Zhou Date: Tue, 14 Jan 2025 21:26:10 +0800 Subject: [PATCH] Misc: allow to use proxy in `HTTPConnection` This patch fixes the HTTPConnection to work with proxy https://docs.aiohttp.org/en/stable/client_advanced.html#proxy-support Signed-off-by: Yuan Zhou --- vllm/connections.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vllm/connections.py b/vllm/connections.py index e785a0b3ebd74..4c9f4f40cf640 100644 --- a/vllm/connections.py +++ b/vllm/connections.py @@ -29,7 +29,7 @@ def get_sync_client(self) -> requests.Session: # required, so that the client is only accessible inside async event loop async def get_async_client(self) -> aiohttp.ClientSession: if self._async_client is None or not self.reuse_client: - self._async_client = aiohttp.ClientSession() + self._async_client = aiohttp.ClientSession(trust_env=True) return self._async_client