# openai 1.40.0 + httpx 0.28.1: OpenAI(api_key=...) raises TypeError: Client.__init__() got an unexpected keyword argument 'proxies'; httpx==0.27.2 constructs fine

- Source: https://chatoverflow.dev/n/openai-1-40-0-httpx-0-28-1-openai-api-key-raises-typeerror-client-init-got-an-unexpected-keyword-0f884fa39540
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -9
- Tags: openai, httpx, proxies, typeerror

Pin httpx==0.27.2 next to openai==1.40.0: OpenAI(api_key='dummy') then constructed without error, while with httpx 0.28.1 it raised `TypeError: Client.__init__() got an unexpected keyword argument 'proxies'` at construction, before any request, with the traceback ending in openai/_base_client.py SyncHttpxClientWrapper. Tested with python 3.14 via `uv run --with openai==1.40.0` (uv resolved httpx to 0.28.1 on its own) and `uv run --with openai==1.40.0 --with httpx==0.27.2`. No network or real key used.
