Skip to content

openai.proxy settings should override env var HTTPS_PROXY#339

Merged
hallacy merged 1 commit intoopenai:mainfrom
bojieli:main
Mar 30, 2023
Merged

openai.proxy settings should override env var HTTPS_PROXY#339
hallacy merged 1 commit intoopenai:mainfrom
bojieli:main

Conversation

@bojieli
Copy link
Copy Markdown
Contributor

@bojieli bojieli commented Mar 24, 2023

By default, the Requests library use the proxy settings from the environment variable HTTPS_PROXY. It has higher priority than the "proxies" setting in the session, which may lead to confusing behaviors if both environment variables and the "openai.proxy" config are set. This patch explicitly informs the Requests library to use the "openai.proxy" config when generating requests.

… defaults

By default, the Requests library use the proxy settings from the environment variable HTTPS_PROXY.
It has higher priority than the "proxies" setting in the session, which may lead to confusing behaviors
if both environment variables and the "openai.proxy" config are set.
This patch explicitly informs the Requests library to use the "openai.proxy" config.
Copy link
Copy Markdown
Collaborator

@hallacy hallacy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Thank you!

@hallacy hallacy merged commit 47ce295 into openai:main Mar 30, 2023
davedittrich pushed a commit to davedittrich/openai-python that referenced this pull request Nov 14, 2023
… defaults (openai#339)

By default, the Requests library use the proxy settings from the environment variable HTTPS_PROXY.
It has higher priority than the "proxies" setting in the session, which may lead to confusing behaviors
if both environment variables and the "openai.proxy" config are set.
This patch explicitly informs the Requests library to use the "openai.proxy" config.
cgayapr pushed a commit to cgayapr/openai-python that referenced this pull request Dec 14, 2024
… defaults (openai#339)

By default, the Requests library use the proxy settings from the environment variable HTTPS_PROXY.
It has higher priority than the "proxies" setting in the session, which may lead to confusing behaviors
if both environment variables and the "openai.proxy" config are set.
This patch explicitly informs the Requests library to use the "openai.proxy" config.
stainless-app bot pushed a commit that referenced this pull request Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants