Getting Started

模型

用于确认 Codex 可用模型、能力差异和适用任务边界。

gpt-5.5
gpt-5.4
gpt-5.4-mini
gpt-5.3-codex-spark

OpenAI 最新 frontier model,面向 Codex 中复杂 coding、computer use、knowledge work 和 research workflows。

面向专业工作的 flagship frontier model,具备强 coding、reasoning、tool use 和 agentic workflow 能力。

快速、高效的 mini model,适合响应式 coding tasks 和 subagents。

text-only research preview model,针对近乎即时的实时 coding iteration 优化。ChatGPT Pro 用户可用。

对大多数 Codex 任务,请从 gpt-5.5 开始。它最适合复杂 coding、computer use、knowledge work 和 research workflows。当你使用 ChatGPT 或 API-key authentication 登录时,GPT-5.5 目前可在 Codex 中使用。

当你希望为较轻量的 coding tasks 或 subagents 使用更快、成本更低的选项时,可以选择相应模型。gpt-5.3-codex-spark model 以 research preview 形式向 ChatGPT Pro subscribers 提供,并针对近乎即时的实时 coding iteration 优化。

其他模型

当你使用 ChatGPT 登录时,Codex 与上面列出的推荐模型配合效果最好。

你也可以将 Codex 指向任何支持 Chat Completions Responses APIs 的 model 和 provider,以适配你的具体 use case。

Chat Completions API support 已被 deprecated,并将在未来 Codex releases 中移除。

已 deprecated 的 Codex models

当你使用 ChatGPT 登录时,gpt-5.2 和 gpt-5.3-codex models 在 Codex 中已 deprecated。如果你的 scripts、configuration files 或 codex exec --model commands 仍引用 deprecated models,请更新为上面列出的最新模型。

某些对 ChatGPT sign-in 已 deprecated 的 models 可能仍可在 API 中使用。如果你的 workflow 依赖其中某个模型,请使用 API-key authentication,并查看 API models page 了解当前可用性。

配置模型

配置默认本地模型

Codex CLI 和 IDE extension 使用同一个 config.toml configuration file 。要指定 model,请在 configuration file 中添加 model entry。如果你没有指定 model,Codex app、CLI 或 IDE Extension 会默认使用推荐模型。

model = "gpt-5.5"

临时选择不同的本地模型

在 Codex CLI 中,可以在 active thread 中使用 /model command 更改模型。在 IDE extension 中,可以使用 input box 下方的 model selector 选择模型。

要用特定 model 启动新的 Codex CLI thread,或为 codex exec 指定 model,可以使用 --model/-m flag:

codex -m gpt-5.5

为 cloud tasks 选择模型

目前不能更改 Codex cloud tasks 的默认模型。

站内延伸阅读