跳转到内容

unexpected status 404 Not Found — Codex

Quick fix

将 config.toml 中 custom provider 的 requires_openai_auth 改为 false,然后开启新会话以避免发送 gpt-reserve。

报错原文
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`。

  1. 切换到第三方供应商后,在 `config.toml` 的 `[model_providers.custom]` 中将 `requires_openai_auth` 改为 `false`。

    config.toml
    [model_providers.custom]
    requires_openai_auth = true
    requires_openai_auth = false
  2. 开启一个新的 Codex 会话,使请求直接使用供应商模型而不触发账号级 `gpt-reserve` 降级。

  3. 每次再次通过 cc-switch 切换供应商后检查该值;原帖称 cc-switch 会将其写回 `true`,需手动改回或使用脚本自动修正。

ToolCodex
Version受影响:cc-switch 3.20.1;Codex 0.153.0
PlatformsmacOSLinux

(暂无 FAQ)

这是一个非官方社区 wiki,与 cc-switch 作者及项目本身无隶属关系。内容整理自项目公开的 GitHub issues。本站不分发任何软件。