Repository navigation
fix(ai): preserve disabled proxy behavior and Windows bypass rules - #3795
Merged
Merged
Conversation
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.
Summary
Restore direct AI connections when app proxy settings are missing or disabled, and preserve Windows system proxy bypass semantics. An enabled proxy with an empty address still inherits OS/environment settings; an explicit address still selects the configured proxy.
Type and Areas
Type: regression fix
Areas: AI adapters, services-core system proxy, focused test guidance
Motivation / Impact
Disabled or legacy proxy settings could unexpectedly send intranet model requests through the OS/environment proxy. Windows
ProxyOverriderules also lost their meaning:<local>became a global bypass and wildcard entries were passed to a matcher with different semantics.Keep missing/disabled settings direct, match Windows wildcard and
<local>rules explicitly, always bypass loopback for system proxies, and retain the selected proxy policy when rebuilding a client with default transport options. Add legacy payload round-trip and routing regression coverage.Verification
git diff --check upstream/main...HEADpassed.cargo test --locked -p openbitfun-services-core --no-default-features --features system-proxy --lib system_proxy::testspassed (10 tests).cargo test --locked -p openbitfun-ai-adapters --lib client::http::testspassed (8 tests).cargo test --locked -p openbitfun-ai-adapters --features subscription-auth --lib client::http::tests::router_proxy_policy_preserves_environment_explicit_and_disabled_routespassed (1 test).Reviewer Notes
No persisted configuration shape changes or manual migration. Tests cover legacy disabled payloads and preserve existing field values through a round trip. Network fixtures use local HTTP servers without changing OS proxy settings or accessing provider accounts.
Checklist