fix(agent): preserve env proxies for custom httpx transports - #12781
Closed
oneXixi-666 wants to merge 1 commit into
Closed
fix(agent): preserve env proxies for custom httpx transports#12781oneXixi-666 wants to merge 1 commit into
oneXixi-666 wants to merge 1 commit into
Conversation
Collaborator
|
Related to merged #12657 (same root cause). May already be partially fixed — verify against current main. |
Collaborator
|
May overlap with merged #12657. |
Contributor
|
Thanks for digging into this proxy regression and for the clean write-up — this is exactly the right fix direction. Unfortunately it's been superseded by an equivalent patch that was already merged before this PR was opened. Automated hermes-sweeper review found:
The main-branch implementation also adds |
This was referenced Aug 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes OpenAI-compatible requests ignoring
HTTPS_PROXY/HTTP_PROXYwhen Hermes injects a customhttpx.HTTPTransportfor TCP keepalive socket options.httpxnormally reads environment proxies, but passing a custom transport bypasses that default behavior. This change preserves the existing keepalive transport while explicitly carrying the configured env proxy for non-local endpoints.Related Issue
Fixes #
Type of Change
Changes Made
_resolve_httpx_env_proxy()to preserveHTTPS_PROXY/HTTP_PROXYfor non-local endpoints._build_keepalive_http_transport()to keep keepalive transport construction encapsulated.How to Test
HTTPS_PROXY=http://127.0.0.1:7890orHTTP_PROXY=http://127.0.0.1:7890.Result locally:
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AScreenshots / Logs
Local targeted test output: