Codex Desktop

在 Windows 或 macOS 中配置算驿,并让 Codex Desktop 重新加载。

更新于 2026-08-17 · 打开控制台 ↗

准备工作

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

配置文件位置

系统 config.toml auth.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,并增加页面生成的授权请求头。

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

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

[features]
goals = true
必须完全重启
保存 API Key Mode 后,完全退出并重启 Codex Desktop,然后新建 task,让客户端重新加载配置。