unexpected status 404 Not Found — Codex
Quick fix
将 config.toml 中 custom provider 的 requires_openai_auth 改为 false,然后开启新会话以避免发送 gpt-reserve。
Symptom
Section titled “Symptom”unexpected status 404 Not Found
Model "gpt-reserve" is not supported by any configured account in this group在 cc-switch 3.20.1 中切换到第三方 custom provider 后,`requires_openai_auth = true` 会使 Codex 将该 provider 视为官方认证路由。官方额度耗尽时,桌面端仍会走账号级降级,并把 `gpt-reserve` 发送到第三方端点;该模型不属于第三方配置的模型组,因此返回 404。
原帖评论确认,cc-switch 对 `cn_official` 预置供应商每次 apply 会强制写入该值。保留的官方 `auth.json` 和界面中的官方账号状态会伴随这一现象,但已验证的即时规避方式是将该配置改为 `false`。
切换到第三方供应商后,在 `config.toml` 的 `[model_providers.custom]` 中将 `requires_openai_auth` 改为 `false`。
config.toml [model_providers.custom]requires_openai_auth = truerequires_openai_auth = false开启一个新的 Codex 会话,使请求直接使用供应商模型而不触发账号级 `gpt-reserve` 降级。
每次再次通过 cc-switch 切换供应商后检查该值;原帖称 cc-switch 会将其写回 `true`,需手动改回或使用脚本自动修正。
Affected Versions
Section titled “Affected Versions”ToolCodex
Version受影响:cc-switch 3.20.1;Codex 0.153.0
PlatformsmacOSLinux
Source Issues
Section titled “Source Issues”本页汇总自 3 个真实 issue
(暂无 FAQ)
401 Unauthorized升级到 cc-switch 4.0.x;或手动清空 ~/.codex/auth.json 中残留的第三方 OPENAI_API_KEY 后重启 Codex,重新走 ChatGPT OAuth 登录。Invalid schema for function — Codex将 CC Switch 升级至包含 v3.18.0 修复的版本可解决 `parameters.type:null` 变体;其他 `null` schema 变体仍需跟踪原帖。The 'glm-5.3' model is not supported - Codex旧版升级最新版并关闭代理接管;4.0.5 聚合模式旧会话仍随机报错时新建对话。
这是一个非官方社区 wiki,与 cc-switch 作者及项目本身无隶属关系。内容整理自项目公开的 GitHub issues。本站不分发任何软件。