* fix: URLComponent ignores proxy in async mode (#12285)
The URLComponent fails to connect for users behind corporate proxies
because its asynchronous mode does not recognize standard system proxy
environment variables. The component defaults to use_async=True, which
initializes the RecursiveUrlLoader; the underlying async loader does
not natively respect system proxy environment variables, so the
component attempts a direct connection and fails in restricted network
environments.
Detect standard proxy environment variables (http_proxy, HTTP_PROXY,
https_proxy, HTTPS_PROXY) in URLComponent._create_loader. If a proxy
is detected and use_async is enabled, override use_async to False so
the loader uses its synchronous implementation, which natively
respects system proxies. Empty and whitespace-only values are
correctly evaluated as no-proxy and do not trigger the fallback.
Closes#10297
* fix(URLComponent): broaden proxy detection and harden tests
Address review findings on the proxy fix:
- Add ALL_PROXY and all_proxy to the detected env vars. ALL_PROXY is
commonly set in corporate and container environments (curl, git,
many Unix tools honour it), and is sometimes the only proxy var
configured.
- Replace the unused proxy_url string with a single boolean any() over
the env var keys, since only the presence of a proxy is consulted.
- Reorganize the proxy tests under TestURLComponentProxyHandling with
a shared default-attributes helper, parametrize over all six env var
spellings, and add coverage for multiple-simultaneous-proxies and
the use_async=False path (which should not log a warning).
* [autofix.ci] apply automated fixes
* fix: remove no_proxy="*" macOS startup hack so corporate proxies work
Two startup paths set `os.environ["no_proxy"] = "*"` on macOS, which
disables proxy use for every HTTP client in the process and every child
gunicorn worker (httpx, requests, urllib3 — and therefore the OpenAI,
Anthropic, Groq, etc. SDKs that wrap them). For users behind corporate
proxies on macOS this made every external LLM call unroutable, even with
HTTPS_PROXY properly set.
The override traces to commit history with no concrete justification —
the only artifact is a Stack Overflow link about a uWSGI segfault, but
Langflow uses gunicorn, not uWSGI. Bench-verified that gunicorn boots
cleanly and serves requests on macOS without it (1 worker via
LangflowApplication, OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES retained,
HTTPS_PROXY survives intact in parent and child).
Verification:
- gunicorn worker spawns and serves /health (200 OK), exits cleanly
- httpx, urllib, requests all resolve HTTPS_PROXY after the macOS init
(previously: all three returned empty proxy maps because of no_proxy=*)
- OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES still set — the actual
fork-safety fix is preserved
Closes the macOS half of #10297. Companion fix for the async URLComponent
half is in #12285 / branch pr-12285-rebased.
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* [autofix.ci] apply automated fixes (attempt 3/3)
* Orjson update
---------
Co-authored-by: Diogo Veiga <diogo.veiga@tecnico.ulisboa.pt>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>