Skip to content

Connect Claude Code and Codex with CC Switch

CC Switch is an open-source desktop app for managing providers for tools such as Claude Code, Codex, and Gemini CLI. These instructions follow v4.0.40 in Direct mode.

In the AlphaTech console, open General → API Keys → Create API Key, enter a name, and select Save changes. Use the copy icon beside your new key to copy the full sk- value. New accounts start at ¥0. Open Personal → Wallet and top up from ¥1 before making a model request. The interactive quickstart illustrates the console steps.

Choose a package for your platform and architecture from the official v4.0.40 release.

  • macOS 12+. Open the universal DMG and move CC Switch to Applications, or install using Homebrew.
  • Windows 10+. Use the MSI installer or extract and launch the portable ZIP for your architecture.
  • Linux. Choose DEB for Debian/Ubuntu, RPM for a supported distribution such as a recent Fedora, or AppImage. These packages require glibc 2.35+ and WebKitGTK 4.1. Arch Linux users can install cc-switch-bin from the AUR.
终端窗口
brew install --cask cc-switch

Install the CLI you plan to use from Claude Code or Codex.

  1. Open CC Switch, select Claude Code or Codex in the sidebar, and open Direct.
  2. Select Add Provider (+) and then Custom Configuration at the top of All.
  3. Enter AlphaTech as the provider name. Paste your full sk- value into API Key. Configure each tool separately, following the labels in your version of CC Switch.
  • API Endpoint is https://alphatech.net.cn. Claude Code appends /v1/messages.
  • Select the native Anthropic Messages format and the ANTHROPIC_AUTH_TOKEN authentication field.
  • Under the advanced options, set the fallback model to claude-sonnet-5. This sets ANTHROPIC_MODEL in ~/.claude/settings.json. The endpoint is stored as ANTHROPIC_BASE_URL.
  • API Request URL is https://alphatech.net.cn/v1. Codex appends /responses.
  • Set the upstream format to Responses (Native), corresponding to wire_api = "responses".
  • Set the default model to gpt-6-luna. If the form shows a model list, put that model first.

CC Switch stores the provider’s API key as OPENAI_API_KEY internally and writes it into the provider’s experimental_bearer_token in ~/.codex/config.toml when you enable it.

Click Add at the bottom of the form. Back in the provider list, click Enable on the AlphaTech card. Quit and relaunch any running Codex CLI or desktop app.

Claude Code

终端窗口
claude --version
claude

Codex

终端窗口
codex --version
codex

Send a short prompt in the CLI and look for the response. You can confirm the request in Usage Logs in the AlphaTech console.

  • 401 or invalid key. Copy the full key again from the console and check that its status is Enabled.
  • 404 or HTML response. Check the Base URL of the tool you selected. Claude Code uses the root URL, and Codex uses the one with /v1. Check the model ID on the pricing page.
  • Balance or quota exhausted. For a balance of ¥0, top up in Wallet from ¥1. For an exhausted key cap, review its quota under API Keys.

See the official CC Switch installation instructions and the provider manual.

需要进一步了解企业方案,或确认服务状态?