How to Connect Chinese LLMs to Codex: A Hands‑On Tutorial
This article walks through installing Codex, adding the open‑source CC Switch tool, and configuring Chinese large language models such as Kimi so they can serve as the backend for Codex’s AI agent, with step‑by‑step screenshots and performance examples.
Installation
Codex client
Download the Codex desktop client for Windows or macOS from https://openai.com/codex/for-work/. Run the installer. On first launch the login screen appears; click the “Use other login method” button and enter the placeholder key 1234 instead of creating a ChatGPT account. This bypasses the overseas‑phone‑number requirement.
CC Switch
CC Switch is an open‑source visual configuration tool that translates Codex’s proprietary protocol into the format required by external large language models. It also provides a graphical interface for editing the TOML configuration that Codex otherwise requires.
Download the latest binary for the appropriate operating system from https://github.com/farion1231/cc-switch (select the first download link for Windows, the second for macOS). Launch the application; the main window shows two panels – an Agent list (including Codex) on the left and a Tool list on the right.
Adding a Chinese model (Kimi example)
Obtain an API key
Visit https://www.kimi.com/code/console, open the “API Keys” page, click “Create API key”, give it a name (e.g., “Codex”), and copy the generated key. The key is shown only once; store it securely.
Configure the model in CC Switch
Select the Codex entry in the Agent list and click the plus (+) button on the right.
From the vendor dropdown choose “Kimi”.
Paste the previously copied API key into the “API Key” field and click “Save”.
Return to the main CC Switch screen and toggle the newly added Kimi entry to “Enabled”.
Routing configuration
Click the configuration (gear) icon in the upper‑left corner.
In the “General” tab enable both soft‑link options under “Codex application enhancements”.
Switch to the “Routing” tab, turn on the global routing switch, then turn on the Codex‑specific routing switch.
Close the dialog and restart the Codex client to apply the changes.
The entire process from downloading Codex to routing configuration takes roughly 15–20 minutes. The same steps apply to other supported models such as DeepSeek or GLM by selecting the corresponding vendor in step 2 above.
Demonstration scenarios
Full‑stack code generation : With Kimi as the backend model, Codex generates a complete FastAPI server and a matching React frontend in a single request, and the resulting project runs without manual code edits.
Image‑to‑UI conversion : Supplying an image to Kimi prompts Codex to produce an ECharts‑based front‑end UI that reproduces the visual layout and can bind dynamic data.
Research report and PPT creation : Kimi’s multimodal and agent capabilities allow Codex to request data retrieval, analysis, and automatic assembly of a research report with charts, followed by generation of a PowerPoint deck. The produced PPT matches or exceeds a manually created two‑hour effort.
Kimi ranks highly on CodeArena and other benchmark lists, comparable to ChatGPT in code generation, long‑context handling, Chinese language support, multimodal input, and agent‑driven tasks. Its membership tier priced at 99 CNY includes both API quota and built‑in PPT/research agents, which can be leveraged directly through the Codex integration.
All images referenced in the original tutorial are retained below for visual reference.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Baobao Algorithm Notes
Author of the BaiMian large model, offering technology and industry insights.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
