mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-26 09:52:11 +03:00
fix(providers): resolve ChatGPT Web authentication failure by aligning TLS fingerprint User-Agent strings (#1925)
This commit is contained in:
@@ -39,7 +39,7 @@ const CONV_URL = `${CHATGPT_BASE}/backend-api/f/conversation`;
|
||||
const USER_LAST_USED_MODEL_CONFIG_URL = `${CHATGPT_BASE}/backend-api/settings/user_last_used_model_config`;
|
||||
|
||||
const CHATGPT_USER_AGENT =
|
||||
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36";
|
||||
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:148.0) Gecko/20100101 Firefox/148.0";
|
||||
|
||||
// Captured from a real chatgpt.com browser session (April 2026).
|
||||
const OAI_CLIENT_VERSION = "prod-81e0c5cdf6140e8c5db714d613337f4aeab94029";
|
||||
|
||||
@@ -20,7 +20,7 @@ import { randomUUID } from "node:crypto";
|
||||
let clientPromise: Promise<unknown> | null = null;
|
||||
let exitHookInstalled = false;
|
||||
|
||||
const CHATGPT_PROFILE = "firefox_148"; // matches the Firefox 150 UA we send
|
||||
const CHATGPT_PROFILE = "firefox_148"; // matches the Firefox 148 UA we send
|
||||
const DEFAULT_TIMEOUT_MS = 60_000;
|
||||
// Grace period added to the binding's wire-level timeout before our JS-level
|
||||
// hard timeout fires. Under healthy operation `tls-client-node` honors
|
||||
|
||||
@@ -2543,7 +2543,7 @@ async function validateChatGptWebProvider({ apiKey, providerSpecificData = {} }:
|
||||
"Sec-Fetch-Mode": "cors",
|
||||
"Sec-Fetch-Site": "same-origin",
|
||||
"User-Agent":
|
||||
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:150.0) Gecko/20100101 Firefox/150.0",
|
||||
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:148.0) Gecko/20100101 Firefox/148.0",
|
||||
},
|
||||
providerSpecificData
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user