Environment details
- Programming language: Python
- OS: Linux
- Language runtime version: 1.55.0
- Package version: 1.55.0
Steps to reproduce
- _http_client = httpx.Client(transport = LogTransport(httpx.HTTPTransport()), event_hooks = {'request': [log_request]}) # Trying to capture what goes on the "wire" via the event hooks
- _http_options = types.HttpOptions(httpx_client = _http_client, timeout = 30000)
- _config=types.GenerateContentConfig(http_options=_http_options)
- client.models.generate_content(config=_config)
The generate_content call does not honor the httpx_client override.
Looing at file _api_client.py, after line 1222, the relevant options are ignored. Adding something like:
try:
if http_options.httpx_client != None:
self._httpx_client = http_options.httpx_client
except:
pass
may enable that the overridden httpx_client is used.
Environment details
Steps to reproduce
The generate_content call does not honor the httpx_client override.
Looing at file _api_client.py, after line 1222, the relevant options are ignored. Adding something like:
try:
if http_options.httpx_client != None:
self._httpx_client = http_options.httpx_client
except:
pass
may enable that the overridden httpx_client is used.