You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With anthropic==0.49.0 and httpx==0.27.0, proxy settings in the env variables in the form of http_proxy and https_proxy are not properly applied to establish connections to anthropic, hence resulting in anthropic.APIConnectionError.
Currently anthropic._base_client._DefaultHttpxClient and _DefaultAsyncHttpxClient sets up a customized transport to initialize httpx client,
and given such, httpx does not respect proxy settings in the env.
Temporarily I can make it work with either
give httpx client to anthropic.Anthropic or AsyncAnthropic
add the following code to _DefaultHttpxClient or _DefaultAsyncHttpxClient
But as a layman, I believe there must be more standardized way to handle proxy with httpx.
Although the issue might be related to recent changes to httpx, it would be the best if anthropic can respect the proxy settings in env out of the box by default.
The text was updated successfully, but these errors were encountered:
Hi,
With anthropic==0.49.0 and httpx==0.27.0, proxy settings in the env variables in the form of
http_proxy
andhttps_proxy
are not properly applied to establish connections to anthropic, hence resulting in anthropic.APIConnectionError.Currently anthropic._base_client._DefaultHttpxClient and _DefaultAsyncHttpxClient sets up a customized transport to initialize httpx client,
and given such, httpx does not respect proxy settings in the env.
Temporarily I can make it work with either
But as a layman, I believe there must be more standardized way to handle proxy with httpx.
Although the issue might be related to recent changes to httpx, it would be the best if anthropic can respect the proxy settings in env out of the box by default.
The text was updated successfully, but these errors were encountered: