mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-13 00:01:35 +08:00
The testOpenAIAccountConnection function was sending requests to chatgpt.com/backend-api/codex/responses without the required Codex CLI identification headers, causing 401 Unauthorized for OAuth/PAT accounts. The gateway Forward path and the compact test path both set these headers: - Originator: codex_cli_rs - User-Agent: codex_cli_rs/<version> - OpenAI-Beta: responses=experimental This patch adds the same headers to the normal (non-compact) OAuth test path. API key accounts and other platforms are unaffected since the headers are inside the isOAuth branch.