推荐分组
【GPT】Plus分组
推荐模型
gpt-5.5
还没有登录?
去登录一、安装 Node.js 环境
方法一:NodeSource。
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs方法二:系统包管理器。
sudo apt update
sudo apt install nodejs npm验证安装:
node --version
npm --version二、安装 Codex
npm install -g @openai/codex --registry=https://registry.npmmirror.com如果你遇到权限问题:
sudo npm install -g @openai/codex --registry=https://registry.npmmirror.com验证安装:
codex --version三、配置 Codex
编辑 ~/.codex/config.toml:
disable_response_storage = true
model = "gpt-5.5"
model_reasoning_effort = "high"
model_provider = "routix"
model_context_window = 1000000
model_auto_compact_token_limit = 900000
[model_providers.routix]
name = "RouTix"
base_url = "https://bgp.routix.cn/v1"
requires_openai_auth = true
wire_api = "responses"然后编辑 ~/.codex/auth.json,把 Key 写在这里,不再需要 shell 环境变量:
{
"OPENAI_API_KEY": "sk-xxxxx"
}如果目录或文件不存在,先创建:
mkdir -p ~/.codex
touch ~/.codex/auth.json四、开始使用
codex最小测试示例:
Print a short hello from the codex official channel on RouTix.五、常见问题
- codex 命令不存在:检查 npm 全局安装目录是否在 PATH 中。
- API 连接失败:检查 ~/.codex/auth.json 是否为合法 JSON,键名是否为 OPENAI_API_KEY。
- 请求失败:先去控制台确认当前令牌能否使用 【GPT】Plus分组。
- 模型不可用:把 model 改成你账户实际可用的 Codex 模型名。