Skip to content
Last verified:

macOS 27.0.1 (arm64); Codex CLI 0.162.1; manual provider configuration with a temporary CODEX_API_KEY credential; gpt-6-astra in the ChatGPT group returned OK through Responses, confirmed in usage logs.

Codex Guide ​

Codex is an AI Agent tool designed for code generation, modification, and review.

This test covered only the CLI request with a regular key described above. Codex App, CC-Switch import, auth.json authentication, WebSocket, and remote compaction were not tested in this run.

Installation ​

Choose an installation method based on your workflow.

Codex App is suitable for users who prefer a graphical interface.

Choose the installer for your system:

After downloading, follow the system prompts to install and launch it.

Connect to TokenFlux ​

After installation, choose one of the following methods to connect Codex to TokenFlux.

Using CC-Switch is recommended for centralized configuration.

Steps:

  1. Follow Create API Key to generate an API key.
  2. In the key list, click "More" on that key and choose "Import to CCS", then confirm the import in the CC-Switch window. See CC-Switch for details.
  3. Enable the imported TokenFlux provider on the Codex page in CC-Switch.
  4. Restart Codex or Codex App.

About Remote Compaction ​

Codex compacts conversation history when a long session approaches the context limit. The compaction method depends on the client version, provider capability settings, and server support.

This guide retains name = "OpenAI" for compatibility with existing configurations. Some versions use that name to select default capabilities; current versions also support explicit provider capability settings, so the display name alone does not determine whether compaction is remote. The remote protocol also changes between versions: the 0.162 series includes an implementation that sends compaction_trigger through Responses requests.

If compaction fails, record the Codex version, group, model, and full error, then follow How to Report a Problem. Provider capability fields are listed in the official configuration reference.

About codex-auto-review ​

The ChatGPT, ChatGPT (Azure), and ChatGPT (不稳定) groups currently redirect codex-auto-review to gpt-6.1-sol by default.

To use another model, configure a model redirect for your key on the API keys page. The target model must be available in the selected group; check its price in the model marketplace.

TokenFlux Documentation