@anxue201: https://x.com/anxue201/status/2067477109816050119

X AI KOLs Timeline Tools

Summary

A detailed configuration guide that teaches users how to connect OpenAI Codex to third-party models like DeepSeek through the open-source proxy tool CC Switch, solving protocol incompatibility issues.

https://t.co/Fq624fLl0o
Original Article
View Cached Full Text

Cached at: 06/18/26, 08:21 PM

Complete Configuration Guide for Connecting Codex to Open-Source Models

OpenAI officially announced support for third-party models last month. However, many friends who followed the documentation found that they couldn’t connect at all. The reason is simple: Codex uses OpenAI’s Responses API, while domestic models use the Chat Completions API. The two protocols are not compatible, so directly modifying config.yaml won’t solve the problem. The solution is to use CC Switch, an open-source local proxy tool that performs protocol conversion in between. Workflow: Codex → CC Switch (local proxy + protocol conversion) → DeepSeek or Tongyi API. Codex thinks it’s connecting to the official interface, but the requests are actually forwarded to the third-party model by CC Switch.

Below, we’ll guide you step by step from scratch.

Step 1: Install Codex

CLI version (recommended for developers): Make sure you have Node.js installed. Go to nodejs.org and download the LTS version. Then open the terminal:

  • Mac/Linux: Run sudo npm install -g @openai/codex
  • Windows: Open PowerShell as Administrator and run npm install -g @openai/codex

After installation, verify by running codex --version. If you see a version number, it’s installed.

Configuration file location after installation:

  • Mac/Linux: ~/.codex/config.yaml
  • Windows: C:\Users\YourUsername\.codex\config.yaml

Desktop version (recommended for beginners): Go directly to codex.openai.com, download the installer, double-click to install, and log in as prompted.

Step 2: Get an API Key

Take DeepSeek as an example. Go to platform.deepseek.com, register an account, find API Keys in the left menu, click Create, and copy the key starting with sk-. New users get free credits, enough for extensive testing. If using Tongyi Qianwen, go to dashscope.aliyun.com — the process is the same.

Step 3: Install CC Switch

Project address: github.com/farion1231/cc-switch. Installation methods by platform:

  • Windows: Go to the Releases page, download the .msi installer, and double-click to install.
  • macOS: Run brew install --cask cc-switch
  • Linux: Download the .deb package and run sudo dpkg -i CC-Switch-*.deb

After installation, launch CC Switch. It will run in the system tray.

Step 4: Configure DeepSeek

Open CC Switch, switch to the Codex tab at the top. In the Providers area on the left, click + Add Provider. Search for DeepSeek in the preset list and select a built-in preset:

  • DeepSeek V4 Flash (fast and low cost, suitable for daily use)
  • DeepSeek V4 Pro (powerful, suitable for complex tasks)

Fill in your DeepSeek API Key. Keep other fields as defaults. Turn on the Needs Local Routing toggle (it should be on by default), then click Save.

Step 5: Enable Local Routing

Click the gear icon in the top-left corner of CC Switch to go to Settings, then select Routing. Turn on the Local Routing switch — the button should turn green. Confirm that Codex routing records are displayed below.

Step 6: Test the Connection

Completely restart Codex (close all Codex windows and terminal processes), then reopen Codex. In the model selection list, you should see DeepSeek V4 Flash or V4 Pro. Send a test message, e.g., write a “Hello World”. Go back to the Routing page of CC Switch and check if the request count has increased. If it has, the proxy is working.

Note: To switch models, simply change the model name in the CC Switch Providers and save — no need to restart Codex. To switch back to official models, just turn off the routing switch in CC Switch.

Troubleshooting Common Issues

  • Model list not showing: Confirm the routing switch is on and green; verify Codex was completely restarted; check if CC Switch’s port is occupied.
  • 400/404 errors: DeepSeek V4 requires protocol conversion. CC Switch’s presets handle it properly — do not manually enter model names.
  • Requests not going through proxy: Check if CC Switch’s routing records show any counts; restart the terminal to apply environment variables.
  • Images and Computer Use not working: Third-party models do not support these OpenAI-exclusive features — this is an expected downgrade.

Real-World Test Data

I ran it for several days: DeepSeek V4 Flash’s response speed is similar to GPT-5, more than sufficient for daily coding and bug fixing. DeepSeek V4 Pro performs well on complex project refactoring but is a bit slower than Flash. The local Qwen 35B doesn’t require internet and is safe for sensitive data, but it falls short on complex reasoning.

Recommended Combination Plan

  • Daily coding: Use DeepSeek V4 Flash
  • Sensitive data: Switch to a local model
  • Complex architecture projects: Switch back to GPT

Advanced Tips

CC Switch supports multi-tool isolated configurations — Codex’s configuration won’t affect Claude Code. You can add multiple providers simultaneously (e.g., DeepSeek + Tongyi) and switch between them at any time. All configurations are stored locally, keeping your API Key secure.

Bookmark this guide and refer back to it when configuring. If you have any questions, leave a comment below.

Similar Articles

@koffuxu: https://x.com/koffuxu/status/2054527573439181206

X AI KOLs Timeline

cc-switch is a desktop application that helps users switch the underlying large model used by Claude Code with one click through a visual interface, without manually modifying configuration files. The article introduces how to install and configure it to access the DeepSeek model, and explains how it works.

@AYi_AInotes: https://x.com/AYi_AInotes/status/2066865618104586525

X AI KOLs Timeline

This is a panoramic analysis of OpenAI Codex, detailing its architecture (five entry points), three layers of extensibility (MCP, Skills, Plugins), a horizontal comparison with Claude Code, Cursor, and Devin, and seven best practices that can be directly adopted.