fix: restore Codex Responses WS TLS profile + apply proxy (#5591, #5611) (#5668)

This commit is contained in:
Diego Rodrigues de Sa e Souza
2026-06-30 12:41:14 -03:00
committed by GitHub
parent 9be5528548
commit 98ebba1801
7 changed files with 96 additions and 6 deletions

View File

@@ -615,11 +615,17 @@ class ResponsesWsSession {
toStringOrNull(responseBody.service_tier) || toStringOrNull(responseBody.serviceTier),
};
const upstream = await this.wsFactory(prepared.json.upstreamUrl, {
browser: prepared.json.browser || "chrome_149",
const wsOptions = {
// #5591: chrome_149 is not a wreq-js 2.3.1 profile (max chrome_147); the
// prepare route now sends chrome_142, this fallback matches it.
browser: prepared.json.browser || "chrome_142",
os: prepared.json.os || "windows",
headers: prepared.json.headers || {},
});
};
// #5611: forward the configured proxy so the upstream WS connect honors the
// Proxy Registry in no-direct-egress deployments.
if (prepared.json.proxy) wsOptions.proxy = prepared.json.proxy;
const upstream = await this.wsFactory(prepared.json.upstreamUrl, wsOptions);
upstream.onmessage = (event) => {
if (this.closed) return;