Skip to content

Codex CLI

Codex 是 OpenAI 推出的终端 AI 编程助手。您可以通过调整配置来使用 ChatECNU 的模型,详见 Responses API 兼容

配置步骤

  1. 修改您的 Codex 配置文件(例如 ~/.codex/config.toml)文件,按如下配置添加 ChatECNU 作为 provider
toml
model = "ecnu-max"
model_provider = "ChatECNU"

[model_providers.ChatECNU]
name = "ChatECNU"
base_url = "https://chat.ecnu.edu.cn/open/api/v1"
wire_api = "responses"
env_key = "ChatECNU-API-KEY"
  1. 设置环境变量:
bash
# Linux / macOS
export ChatECNU-API-KEY=your_api_key_here

# Windows (PowerShell)
$env:ChatECNU-API-KEY = "your_api_key_here"
  1. 启动 Codex,即可使用 ChatECNU 的模型能力。

思考强度可通过 reasoning.effort 指定,档位映射详见 Responses API 兼容 思考强度支持

您的请求将按 credits 配额统一处理,详见 配额限制