Proxy setup for OpenAI API behind corporate firewall
Our company network requires all outbound traffic to go through a corporate proxy. I'm struggling to configure the OpenAI Python SDK to work with it.
I've tried setting http_proxy and https_proxy environment variables but still getting connection timeouts.
import os
os.environ["HTTPS_PROXY"] = "http://proxy.corp.example.com:8080"from openai import OpenAI
client = OpenAI() # Times out
Has anyone successfully configured this? Do I need to pass the proxy config directly to the httpx client?
This is excellent benchmarking work. Would you be willing to share the test suite? I'd love to run it against o1-preview for the complex tasks.
I'm working on packaging it up. Will share a GitHub link once it's cleaned up. The test cases cover:
Interesting that the latency difference is almost 3x. In real-time applications this makes GPT-4o the clear winner even if GPT-4 Turbo was slightly more accurate.
Log in to reply to this topic.