mirror of
https://github.com/deepseek-ai/awesome-deepseek-agent.git
synced 2026-11-05 01:07:37 +00:00
[GH-ISSUE #435] Windows: codex-deepseek-setup-en.ps1 breaks the ChatGPT desktop app (forced_login_method=api); no request ever reaches DeepSeek #132
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/awesome-deepseek-agent#132
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Tyxiang on GitHub (Sep 30, 2026).
Original GitHub issue: https://github.com/deepseek-ai/awesome-deepseek-agent/issues/435
Environment
OpenAI.Codex)client_version=26.928.21956)codex-deepseek-setup-en.ps1(menu option 1,deepseek-flash); the zh-CN.ps1was run as well%USERPROFILE%\.codex\logs_2.sqlite, tablelogs, 21,103 rows covering 2026-09-20 → 2026-09-30Symptom
After running the one-command script, the Codex / ChatGPT desktop app becomes unusable: every model request fails with
401, the plugin marketplace and remote control stop working, and escalated turns end inTurn error.At the same time not a single request ever reached the DeepSeek API. In the whole 21,103-row log database the string
api.deepseek.comappears exactly twice, and both occurrences are the client echoing its own configuration object — there is no request or response from DeepSeek anywhere.So this is not an API key, balance, or
base_urlproblem: the client breaks before any DeepSeek traffic is produced.Evidence (2026-09-30, local time; secrets redacted)
1. The provider block the script wrote is correct and did load:
2. Global auth was forced to API-key mode, so ChatGPT-dependent services 401:
3. The two routing worlds collide — a DeepSeek model id is sent to the ChatGPT backend:
4.
preferred_auth_methodis a dead key in every shipped build:String scanning both
codex.exebinaries confirms it:preferred_auth_methodoccurs 0 times in 0.130.0 and 0.159.2, whileforced_login_methodoccurs 2 and 22 times. So only the latter takes effect, and it is the destructive one.5.
model_catalog_jsonreplaces the built-in catalog:Writing
~/.codex/models.jsonwith only the two DeepSeek slugs removes metadata for the app's built-in models.Restoring
config.toml(13:00:14) resolved everything: from 13:02 the logs showauth_mode="Chatgpt",auth_header_attached=true, successful/modelscalls and zeroERRORrows.Root cause
The script's DeepSeek provider stanza is correct and matches the docs. The failure comes from the three settings it writes alongside it:
forced_login_method = "api"switches the client to API-key auth and stops attaching the ChatGPT OAuth credential. But the desktop app is not a pure model client: its plugin marketplace, remote control, account state, model-catalog refresh and startup prewarm all targetchatgpt.com/backend-apiand require the ChatGPT session. They all fail with 401.preferred_auth_method = "apikey"is not recognized by any shipped Codex build (see 4) and only produces an ERROR-level log line.model_catalog_json = "~/.codex/models.json"replaces rather than merges the built-in catalog.Because all three live in the shared
~/.codex/config.toml,config.toml-based isolation is impossible: the CLI, the desktop app and the IDE extension all read it.Suggested fixes
forced_login_method = "api"by default. At minimum, detect the ChatGPT desktop app and let the user choose between "CLI only" and "desktop app degrades".preferred_auth_method, or add support for it — today it only yields an ERROR log.CODEX_HOME(e.g.%USERPROFILE%\.codex-deepseek) and leaves the shared~/.codex/config.tomluntouched. This should be the recommended default, since it keeps the desktop app fully signed in.model_catalog_jsonwith the built-in catalog, or document that built-in model metadata is replaced.~/.codex/backup-deepseek/, but that directory did not exist on this machine (nor did~/.codex/models.json), so the restore was done by hand.Note
This is a user-side diagnosis from client logs, not a patch — the script source itself was not available to me (the CDN serves it as
application/octet-stream). Happy to provide the full raw log rows or reproduce on request.中文摘要
Windows 上执行
codex-deepseek-setup-en.ps1(菜单 1,deepseek-flash)后,Codex / ChatGPT 桌面端完全不可用:模型请求全部 401,插件市场与远程控制失效;而整个日志库 21,103 条中api.deepseek.com只出现 2 次(均为配置回显),没有任何请求真正到达 DeepSeek。脚本写入的 provider 段(
base_url/wire_api = "responses"/experimental_bearer_token)与文档一致、本身正确。问题是它一并写入的forced_login_method = "api"把客户端切成 API Key 认证模式,而桌面端的插件市场、远程控制、账号态固定访问chatgpt.com/backend-api且必须携带 ChatGPT OAuth,因此全部 401。另外preferred_auth_method在当前所有已发布 Codex 构建中都不存在(两个 codex.exe 字符串扫描均为 0 次命中),model_catalog_json会替换而非合并内置模型目录。建议:不要默认写入
forced_login_method;删除preferred_auth_method;增加"仅 CLI"模式(写入独立 CODEX_HOME,不碰共享配置);合并而非替换模型目录;复核文档承诺的备份路径。