准备工作

  • 创建绑定 Codex-GPT 分组的 API 密钥
  • 在密钥行点击“使用密钥”
  • 复制页面生成的 Codex 配置
  • 选择当前操作系统和认证模式

配置文件位置

系统config.tomlauth.json
Windows%userprofile%\.codex\config.toml%userprofile%\.codex\auth.json
macOS / Linux~/.codex/config.toml~/.codex/auth.json

认证模式

兼容模式保留旧版 Codex 配置;API Key Mode 用于授权客户端图片执行器。API Key Mode 需要关闭 requires_openai_auth,并增加页面生成的授权请求头。

toml
model_provider = "OpenAI"
model = "gpt-5.5"
review_model = "gpt-5.5"
model_reasoning_effort = "xhigh"

[model_providers.OpenAI]
name = "OpenAI"
base_url = "https://milorouter.com"
wire_api = "responses"
requires_openai_auth = false
http_headers = { "x-openai-actor-authorization" = "local-image-extension" }

[features]
goals = true