fix(proxy): allow concurrent proxy dispatcher streams - #4288
diegosouzapw merged 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces the OMNIROUTE_PROXY_DISPATCHER_CONNECTIONS environment variable to configure the maximum concurrent sockets per cached HTTP/SOCKS proxy dispatcher, defaulting to 32 and capped at 256. It updates open-sse/utils/proxyDispatcher.ts to parse, validate, and apply this limit, and adds corresponding unit tests in tests/unit/proxy-dispatcher-family.test.ts along with documentation in .env.example and docs/reference/ENVIRONMENT.md. There are no review comments, and I have no additional feedback to provide as the implementation is clean and well-tested.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
Thanks @wilsonicdev! 🙏 Merged into |
Summary
Fixes #4163 by allowing cached HTTP/SOCKS proxy dispatchers to open multiple concurrent upstream sockets. With
pipelining: 0, long-lived SSE streams such as Codex/v1/responsescan otherwise serialize through a single proxy connection when several requests share the same account-level proxy.Changes:
OMNIROUTE_PROXY_DISPATCHER_CONNECTIONSwith default32and cap256keepAliveTimeout: 1,keepAliveMaxTimeout: 1,pipelining: 0).env.exampleanddocs/reference/ENVIRONMENT.mdValidation
node --import tsx --import ./open-sse/utils/setupPolyfill.ts --import ./tests/_setup/isolateDataDir.ts --test tests/unit/proxy-dispatcher-family.test.tsnpm run test:fixesnode --import tsx --import ./open-sse/utils/setupPolyfill.ts --import ./tests/_setup/isolateDataDir.ts --test tests/unit/proxy-fetch.test.ts tests/unit/proxy-egress-isolation-bdd.test.ts tests/unit/proxyfetch-vercel-relay-2743.test.ts tests/unit/provider-limits-apikey-proxy-context.test.tsnpm run typecheck:corenpm run check:env-doc-sync