Skip to main content
Use in AI Tools

Codex

Use Coding Plan with Codex

Codex is a coding agent from OpenAI.

Install Codex

  1. Install or update Node.js (v18.0 or later).
  2. Install Codex 0.80.0 or earlier (required for Chat and Completions APIs support):
npm install -g @openai/codex@0.80.0
Verify installation:
codex --version

Set up Coding Plan

  1. Modify the config file
Codex versions later than 0.80.0 do not support the Chat and Completions APIs that Coding Plan requires. Install version 0.80.0 or earlier (see Install Codex).
Copy this into ~/.codex/config.toml (for model, choose a supported model):
model_provider = "Qwen_Cloud_Coding_Plan"
model = "qwen3.5-plus"
[model_providers.Qwen_Cloud_Coding_Plan]
name = "Qwen_Cloud_Coding_Plan"
base_url = "https://coding-intl.dashscope.aliyuncs.com/v1"
env_key = "OPENAI_API_KEY"
wire_api = "chat"
  1. Configure the environment variable
Set OPENAI_API_KEY to your Coding Plan API key.
  • macOS
  • Windows
  1. Check your default shell:
echo $SHELL
  1. Set the environment variable based on your shell type:
  • Zsh
  • Bash
# Replace YOUR_API_KEY with your Coding Plan API key.
echo 'export OPENAI_API_KEY="YOUR_API_KEY"' >> ~/.zshrc
  1. Apply the change:
  • Zsh
  • Bash
source ~/.zshrc

Use Codex

  1. Open a new terminal and launch Codex:
codex
Skip the update prompt if it appears.
  1. Start a conversation.