Skip to content

CC-Switch · Codex Setup

Use CC-Switch to connect Codex to Tianshu, without editing config.toml and auth.json by hand.

Before starting, complete the Common Steps: download and install CC-Switch, and finish the environment check and Codex install.

Configuration steps

  1. Open CC-Switch and switch to Codex in the group bar at the top.
  2. Click Add Provider / New Config and create a custom provider:
    • Name: 天枢 (custom)
    • Base URL: https://tian-shu.org/v1
    • API Key: a Codex group token created in the Console (codex / codex-pro / codex-plus / codex-free)
  3. For the model name, use a Codex model name from that group on the Model Marketplace.
  4. After saving, click Enable on the main screen; "In use" means it's done.

Test

Run in a terminal:

bash
codex

When the chat interface appears and you get a normal reply, the configuration succeeded.

Prefer to configure manually?

If you run into trouble with CC-Switch's graphical config, or you're more comfortable editing files yourself, see Codex Manual Setup.