Codex
Cài đặt thủ công
Tự sửa config.toml và auth.json nếu bạn không muốn dùng script
Khuyến nghị dùng script
Cách cài bằng 1 lệnh làm đúng toàn bộ các bước dưới đây và tự sao lưu config cũ. Chỉ làm thủ công khi bạn thực sự cần.
Cài Codex CLI
npm install -g @openai/codexSửa file config.toml
Mở (hoặc tạo mới) file config theo hệ điều hành:
Đường dẫn:
~/.codex/config.tomlThay toàn bộ nội dung file bằng:
model_provider = "OpenAI"model = "gpt-5.6-sol"review_model = "gpt-5.6-sol"model_reasoning_effort = "xhigh"disable_response_storage = truenetwork_access = "enabled"windows_wsl_setup_acknowledged = truemodel_context_window = 1000000model_auto_compact_token_limit = 900000[model_providers.OpenAI]name = "OpenAI"base_url = "https://vibi.top/v1"wire_api = "responses"requires_openai_auth = trueTạo file auth.json
Cùng thư mục với config.toml, tạo file auth.json:
{
"OPENAI_API_KEY": "sk-key-cua-ban"
}Thay sk-key-cua-ban bằng API key thật.
auth.json = codex login
Ghi key vào auth.json có tác dụng y hệt chạy codex login rồi dán key — và dùng chung cho cả
CLI, VS Code extension lẫn app Codex.
Trên macOS/Linux, nên giới hạn quyền đọc file chứa key:
chmod 600 ~/.codex/auth.json