AzureOpenAI client - TypeError: Client.__init__() got an unexpected keyword argument 'proxies

Hello,

I am using openai==1.14.3 in my application and today out of the blue, when I am using AzureOpenAI like this:

from openai.lib.azure import AzureOpenAI

openai_client = AzureOpenAI(
    azure_endpoint=AZURE_OPENAI_ENDPOINT,
    api_key=AZURE_OPENAI_API_KEY,
    api_version=api_version,
)

I am getting this error

openai_client = AzureOpenAI(
File /usr/local/lib/python3.10/site-packages/openai/lib/azure.py, line 205, in init
super().init(
File /usr/local/lib/python3.10/site-packages/openai/_client.py, line 112, in init
super().init(
File /usr/local/lib/python3.10/site-packages/openai/_base_client.py, line 801, in init
self._client = http_client or SyncHttpxClientWrapper(
TypeError: Client.init() got an unexpected keyword argument ‘proxies’

Can someone please help?

Same error. Just upgraded to openai==1.55.2 and started seeing this error.

Hit the same bug myself and noticed it’s just been fixed in 1.55.3.

4 Likes

Thanks! Also testing in previous versions now

I have the same issue. I am using a old version (1.3.2)

Im using Azure functions , and I have the same issue.

I didn’t change any version and just installed packages again and facing the same problem

They just released version 1.55.3. You can check the release notes: There it is written that this specific bug is fixed.

1 Like

The error is not specific to Azure, right? And it doesn’t seem to be specific to the new version, as I fixed the version to 1.31.1 and it persists.

I think issue is fixed now …

1 Like

Same problem, fixed with upgraded into openai==1.55.3

1 Like

I ran into this same issue with:
from openai import OpenAI

I was using version 1.52.2 but when I upgraded to 1.55.3 it fixed the issue.