Công cụ & IDE

Cấu hình Codex CLI

Thiết lập Codex CLI với cheapkeyai.shop bằng config.toml, auth.json, model provider và các lệnh kiểm tra.

Codex CLI có thể dùng OpenAI-compatible endpoint của cheapkeyai.shop. Cấu hình nên đặt trong thư mục `.codex` của user để dùng ổn định qua nhiều project.

Cài đặt tự động

macOS / Linux
curl -fsSL https://cheapkeyai.shop/cdn/codex/setup.sh | bash
Windows PowerShell
irm https://cheapkeyai.shop/cdn/codex/setup.ps1 | iex

Cài đặt Codex

npm
npm i -g @openai/codex@latest

Tạo file config.toml

config.toml
model_provider = "cheapkeyai"
model = "gpt-5.2"
model_reasoning_effort = "xhigh"
model_verbosity = "high"
network_access = "enabled"
disable_response_storage = true
windows_wsl_setup_acknowledged = true

[model_providers.cheapkeyai]
name = "cheapkeyai"
base_url = "https://cheapkeyai.shop/v1"
wire_api = "responses"
requires_openai_auth = true

Tạo file auth.json

auth.json
{
  "OPENAI_API_KEY": "sk-your-api-key-here"
}

Sử dụng

Lệnh cơ bản
codex
codex -m gpt-5.3-codex -c model_reasoning_effort="xhigh"
codex "Review thay đổi hiện tại và đề xuất test cần chạy"

Khắc phục sự cố

  • Codex không kết nối: kiểm tra `base_url`, `wire_api` và `auth.json`.
  • Command not found: kiểm tra npm global bin có nằm trong PATH không.
  • Model trả lời lạ: thử model khác hoặc giảm/tăng reasoning effort theo task.
  • Không đọc được network: bật cấu hình network nếu workflow cần truy cập web/API.