Skip to content

Codex 无法生图的解决方法

如果已经安装 CC-Switch,请打开并编辑当前供应商。

config.toml[model_providers.custom] 下添加以下配置,保存后重启 Codex:

toml
requires_openai_auth = false
http_headers = {"x-openai-actor-authorization" = "https://api.beiapi.cn/v1"}

如果没有安装 CC-Switch,编辑以下文件:

Windows:

text
C:\Users\<你的用户名>\.codex\config.toml

macOS / Linux / WSL:

text
~/.codex/config.toml

修改前建议先备份原有的 config.toml

为清晰、稳定的模型接入而写。