Skip to content

feat: Add httpx[socks] to support socks5:// proxies for RAG_OPENAI_PROXY - #321

Open
xam1986 wants to merge 1 commit into
LibreChat-AI:mainfrom
xam1986:fix/socks5-proxy-support
Open

xam1986 wants to merge 1 commit into
LibreChat-AI:mainfrom
xam1986:fix/socks5-proxy-support

Conversation

@xam1986

@xam1986 xam1986 commented Aug 30, 2026

Copy link
Copy Markdown

Add httpx[socks] to support socks5:// proxies for RAG_OPENAI_PROXY

Description:

Problem

RAG_OPENAI_PROXY is passed straight through to OpenAIEmbeddings as
openai_proxy, which httpx uses to build the OpenAI client's transport.
httpx only supports socks5:///socks5h:// proxy URLs when the optional
socksio extra is installed — without it, using a SOCKS proxy fails at
runtime. Deployments that need a SOCKS proxy currently have to build a
custom derived image just to pip install httpx[socks].

Fix

Add httpx[socks] to requirements.txt and requirements.lite.txt so
SOCKS proxy support works out of the box, and document the supported
proxy schemes in the README.

httpx raises an error when RAG_OPENAI_PROXY is a socks5:// or
socks5h:// URL unless the optional socksio dependency is installed,
forcing users to build a custom image just to add httpx[socks].
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.

1 participant