Synthetic fixtures computed locally. No model or production service is contacted.
Experiment workspace
Decision trace
The question this experiment answers
Which hop does an anthropic-sdk-python client use for a request: a direct connection, the proxy from the environment, or the proxy passed as proxy=? Choose the SDK version, the request URL, the proxy= argument, trust_env, an optional bypass mount and the proxy variables. The model builds the mount patterns the way DefaultHttpxClient and httpx2 do in 2.13.0 and 2.14.0, sorts them by specificity and reports the first match, plus the route the other version would take.
Change one assumption at a time
Start from a preset and change a single control. In the first preset, switch the version from 2.13.0 to 2.14.0 and watch the route move from proxy A to proxy B. Add NO_PROXY=.anthropic.com to the variables, then change the target to https://anthropic.com to see that a leading dot matches subdomains only. Set trust_env to False on each version. Add the bypass mount for api.anthropic.com to keep that host off the proxy on 2.14.0.
Expected outcomes
proxy= B with HTTPS_PROXY A: proxy A on 2.13.0, proxy B on 2.14.0. proxy= B with NO_PROXY=.anthropic.com: direct on 2.13.0, proxy B on 2.14.0. trust_env False with HTTP_PROXY A for a localhost target: proxy A on 2.13.0, direct on 2.14.0. 2.14.0 with proxy= B and a bypass mount for api.anthropic.com: direct on both versions. NO_PROXY=* with proxy= B: proxy B on both, because NO_PROXY=* discards every environment proxy. These match the companion example, whose model was checked against both installed SDK versions.
Read the metrics and the table
The metrics show the route for the target, the mount pattern that matched, the route on the other version and whether the upgrade changes it. The table lists every mount pattern in the order httpx2 tries them, its target and whether it matches the request URL; the chosen row is marked. The trace shows the environment mounts httpx2 derives, how the chosen version combines them with proxy=, and the final match.
What to take back to a real system
Before upgrading to 2.14.0, list where your code passes proxy=, trust_env or mounts, record the proxy variables in each environment, and decide the intended route for every host the client calls. Where a host must stay direct while proxy= is set, add an all:// mount for it. Then confirm the route with a local listener rather than assuming it.
Limits
Host names only: IP addresses and CIDR ranges in NO_PROXY, ports in patterns and the system proxy settings that Python reads on Windows and macOS when no variable is set are not modelled. It covers the two SDK versions measured with httpx2 2.16.2. No request is sent; everything is computed in the browser.