- codex cli (使用
npm i -g @openai/codex进行安装) - python
- 把原始题面命名为
problem.jsonl放到当前目录中,如果题目过多(10题以上)需要拆分 - 使用
./run_prompts.sh prompts/solve.md运行解题脚本 - 生成答案,最终生成的答案文件为
answer.json,各个题目的单独解答保存在solutions/problem_id
使用openai 官方 api 即可,这里提供中转站 api 以供测试 apikey
sk-WSbF0YNVXKRpiB6g8TOwPyx3wFM3TV115h4Y0QLeCRybG1MU
中转站 api 配置说明
# 创建 CodeX 配置目录
mkdir -p ~/.codex
cd ~/.codex
# 创建配置文件
cat > config.toml << 'EOF'
model_provider = "duckcoding"
model = "gpt-5.1-codex"
model_reasoning_effort = "high"
network_access = "enabled"
disable_response_storage = true
[model_providers.duckcoding]
name = "duckcoding"
base_url = "https://jp.duckcoding.com/v1"
wire_api = "responses"
requires_openai_auth = true
EOF
# 创建认证文件
cat > auth.json << 'EOF'
{
"OPENAI_API_KEY": "sk-WSbF0YNVXKRpiB6g8TOwPyx3wFM3TV115h4Y0QLeCRybG1MU"
}
EOF