googleapis / googleapis/python-genai
grpc_proxy no longer supported in latest Python SDK? need a way to set proxy only for genai without affecting internal services
- Dominant language
- Python
- Stars
- 4k
- Forks
- 1k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 40
Description
In the latest version of the Python SDK, it seems that grpc_proxy is no longer supported or has no effect.
Our typical use case requires accessing genai services via a proxy, while at the same time running internal services (e.g., downloading images and videos from internal networks) that must not go through a proxy.
Setting global environment variables such as:
os.environ['HTTP_PROXY'] = proxy_address
os.environ['HTTPS_PROXY'] = proxy_address
is not acceptable in our case, especially in a multiprocessing context, because it will interfere with internal services that are not supposed to use any proxy.
Previously, we were able to control access to genai using:
os.environ['grpc_proxy'] = proxy_address
This allowed us to isolate proxy usage to only genai-related calls, without affecting other parts of the system.
We would like to request:
- Either continued support for grpc_proxy (or an equivalent mechanism)
- Or an official way to configure proxy settings specifically for genai access, without requiring global proxy environment variables
This is particularly important in environments where multiple processes are running and some require proxy while others must not use it.
Thanks!
Contributor guide
Assessment
This issue has not been assessed yet.