Codex CN Bridge for Openclaw

A protocol conversion bridge that allows the OpenAI Codex CLI to utilize high-performance domestic Chinese AI models.

luckkiven
v1.0.0
Mar 5, 2026
0
1.1k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install codex-cn-bridge

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install codex-cn-bridge using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Codex CN Bridge?

The Codex CN Bridge is a specialized technical utility designed to bridge the gap between the OpenAI Codex CLI and domestic Chinese AI providers. By acting as a transparent proxy, this skill converts OpenAI Responses API calls into Chat API calls compatible with leading models such as Alibaba Qwen, Moonshot Kimi, and Zhipu GLM. It allows developers to maintain their existing Codex workflows while benefiting from the localized performance and specific coding capabilities of domestic LLMs.

As a vital component of the Openclaw Skills ecosystem, the bridge handles all protocol translation, request routing, and response formatting. This ensures that the Codex CLI receives data in its expected format, regardless of the underlying model provider being used. It is an ideal solution for developers seeking low-latency AI assistance within regions where direct OpenAI access may be limited or where domestic coding models provide superior context for specific tasks.

Codex CN Bridge Use Cases

  • Using high-performance domestic models like Qwen-Coder-Plus for specialized programming tasks.
  • Reducing latency for AI-assisted coding by utilizing domestic cloud infrastructure.
  • Accessing AI coding features in environments where OpenAI API endpoints are restricted.
  • Centralizing the management of multiple Chinese AI provider keys through a single Codex interface.

How Codex CN Bridge Works

  1. The user issues a command via the Codex CLI which generates an OpenAI-style Responses API request.
  2. The Codex CN Bridge intercepts this request at the local proxy layer.
  3. The bridge translates the OpenAI protocol into the Chat Completion format required by providers like Alibaba Cloud or Moonshot.
  4. The domestic AI model processes the prompt and returns a response to the bridge.
  5. The bridge converts the provider's response back into the OpenAI Responses format.
  6. The processed response is delivered to the Codex CLI for the user to interact with.

Codex CN Bridge Setup

To integrate this bridge into your workflow via Openclaw Skills, follow these installation and configuration steps:

  1. Install the skill and run the setup script:
openclaw skills install codex-cn-bridge
/codex-cn-bridge install
  1. Configure your API keys by editing the environment file at ~/.codex/cn-bridge.env:
# Add your specific provider keys
QWEN_API_KEY=sk-your-key-here
KIMI_API_KEY=sk-your-key-here
  1. Launch the proxy service to begin handling requests:
/codex-cn-bridge start

Codex CN Bridge Data Schema & Taxonomy

The Codex CN Bridge manages its operations through a specific file hierarchy located in the user's home directory. This structure is automatically handled when using Openclaw Skills to ensure consistency:

Path Purpose
~/.codex/cn-bridge.env Contains sensitive API credentials for domestic providers.
~/.codex/config.toml The main Codex configuration file used to route requests to the bridge.
~/.codex/cn-bridge/proxy.py The Python-based logic for protocol translation and API bridging.
~/.codex/cn-bridge/models.yaml A registry of supported domestic models and their endpoint configurations.
~/.codex/cn-bridge/logs/ Local storage for session logs and debugging information.

Codex CN Bridge Advanced Features

  • Support for specialized coding models including Qwen-Coder-Plus and Qwen3-Max.
  • One-click Codex configuration that automatically updates the CLI to point to the local bridge.
  • Flexible model switching using CLI arguments to target specific providers like Kimi or Zhipu GLM.
  • Interactive mode support for real-time, multi-turn AI coding conversations.
  • Automatic port management with built-in service status monitoring and diagnostic tools.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0