@@ -38,7 +38,7 @@ def __init__(
3838 client_id : str ,
3939 version : str ,
4040 timeout : Optional [int ] = None ,
41- transport : Optional [httpx .BaseTransport ] = httpx . HTTPTransport () ,
41+ transport : Optional [httpx .BaseTransport ] = None ,
4242 ) -> None :
4343 super ().__init__ (
4444 api_key = api_key ,
@@ -51,7 +51,9 @@ def __init__(
5151 base_url = base_url ,
5252 timeout = timeout ,
5353 follow_redirects = True ,
54- transport = transport ,
54+ # Only pass the transport if a custom one is provided, otherwise let httpx use
55+ # the default so we don't overwrite environment configurations like proxies
56+ transport = transport if transport else None ,
5557 )
5658
5759 def is_closed (self ) -> bool :
@@ -136,7 +138,7 @@ def __init__(
136138 client_id : str ,
137139 version : str ,
138140 timeout : Optional [int ] = None ,
139- transport : Optional [httpx .AsyncBaseTransport ] = httpx . AsyncHTTPTransport () ,
141+ transport : Optional [httpx .AsyncBaseTransport ] = None ,
140142 ) -> None :
141143 super ().__init__ (
142144 base_url = base_url ,
@@ -149,7 +151,9 @@ def __init__(
149151 base_url = base_url ,
150152 timeout = timeout ,
151153 follow_redirects = True ,
152- transport = transport ,
154+ # Only pass the transport if a custom one is provided, otherwise let httpx use
155+ # the default so we don't overwrite environment configurations like proxies
156+ transport = transport if transport else None ,
153157 )
154158
155159 def is_closed (self ) -> bool :
0 commit comments