Skip to main content

Codex Configuration Document

Overview

This document explains how to configure OpenAI Codex using the CloudBase AI CLI.

Cloudbase AI CLI Introduction Documentation

CloudBase AI CLI supports configuring OpenAI Codex in two ways:

  • CloudBase Configuration: One-click login to CloudBase, select a CloudBase environment, and use the Deepseek/Kimi large model within the CloudBase environment.
  • Custom Configuration: Configure your OpenAI-compatible Base URL and API Key

CloudBase Configuration

Run:

tcb ai --setup

After the command runs, it will enter the configuration wizard.

  1. Select the AI programming assistant to configure, then select OpenAI Codex
  2. Select the configuration method, choose Use CloudBase service, one-click login, no configuration required
  3. Follow the prompts to log in to your account and select a CloudBase environment as needed.
  4. Select the large model provider and model name to use. After configuration is complete, it will directly connect to the large model configured on the CloudBase platform. For details, refer to the Large Model Access Guide
  5. Finally, you can select the default AI programming assistant to use. Subsequent runs of tcb ai will then open it by default.

The configuration is complete after all inputs are provided.

Custom Configuration

Run:

tcb ai --setup

After the command runs, it will enter the configuration wizard.

  1. Select the AI programming assistant to configure, then select OpenAI Codex
  2. Select the configuration method, choose Self-configured API KEY and Base URL
  3. Enter Base URL, API KEY, and model name
  4. Finally, you can select the default AI programming assistant to use. Subsequent runs of tcb ai will then open it by default.

The configuration is complete after all inputs are provided.

Start OpenAI Codex

tcb ai -a codex
tip

If OpenAI Codex is configured as the default, you can directly run tcb ai.

Detailed Configuration Guide

Custom Configuration

Configure Kimi K2

Refer to the Custom Configuration section, where:

  • Base URL: Select the preset Kimi Base URL
  • API KEY: Enter your Kimi API KEY, which can be obtained from Kimi
  • Model name: kimi-k2-0711-preview

Configure Zhipu glm-4.5

Refer to the Custom Configuration section, where:

  • Base URL: Select the preset Zhipu Base URL
  • API KEY: Enter your Zhipu API KEY, which can be obtained from Zhipu BigModel
  • Model name: glm-4.5