From 00eac7ec9b27c8e1e90616b805684000ceddc8e0 Mon Sep 17 00:00:00 2001 From: Tai An Date: Wed, 24 Jun 2026 00:58:44 -0700 Subject: [PATCH] [diffusion] fix: disable proxy env in warmup health probe (#28503) --- .../multimodal_gen/runtime/entrypoints/http_server.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/sglang/multimodal_gen/runtime/entrypoints/http_server.py b/python/sglang/multimodal_gen/runtime/entrypoints/http_server.py index c689580aa..519dbd818 100644 --- a/python/sglang/multimodal_gen/runtime/entrypoints/http_server.py +++ b/python/sglang/multimodal_gen/runtime/entrypoints/http_server.py @@ -60,7 +60,11 @@ SERVER_WARMUP_BYPASS_PATHS = ( async def _wait_until_http_ready(server_args: ServerArgs) -> None: """for server warmup""" health_url = f"{server_args.url()}/health" - async with httpx.AsyncClient() as client: + # Probe the local server directly: a loopback readiness check must never be + # routed through an HTTP proxy. trust_env=False also avoids crashing startup + # on a malformed proxy env var, since httpx parses *_PROXY/NO_PROXY when the + # client is constructed (raising httpx.InvalidURL before any request). See #28493. + async with httpx.AsyncClient(trust_env=False) as client: for _ in range(120): try: response = await client.get(health_url, timeout=5.0)