Codex++ is a fork of openai/codex that adds third-party model provider support (Chat Completions, Anthropic, custom providers) alongside the original OpenAI Responses API.
Codex++ runs locally on your computer as the codex++ command. It builds as a standalone executable with zero dependencies.
Codex++ extends the official Codex CLI with:
- Chat Completions API (
wire_api = "chat") - connect to any OpenAI-compatible provider: Ollama, vLLM, LiteLLM, DeepSeek, Mistral, Groq, Together, DashScope, and more. - Anthropic Messages API (
wire_api = "anthropic") - use Claude models directly through Anthropic's native API. - Multi-agent v2 opt-out (
features.multi_agent_v2 = false) - honor an explicit local disable even when the model catalog selects v2, so third-party providers are not forced onto its Responses API-specific namespaced and encrypted-schema tool protocol. - Auth header scheme control (
env_key_auth) - choose betweenBearerandx-api-keyauth per provider. - Provider-specific request fields (
extra_body) - merge arbitrary JSON into request bodies for provider-specific features likeenable_thinkingorthinking_budget. - Non-GPT-friendly file tools - offer hashline editing and Claude Code-compatible structured
Read/Editinterfaces, giving models that struggle with Codex's freeformapply_patchgrammar more reliable alternatives. - Always retry - automatic exponential backoff for any reasonable conditions.
For a detailed technical breakdown, see codex-rs/README.md.
curl -fsSL https://github.com/yuguorui/codex/releases/latest/download/install-fork.sh | shThe install script resolves the latest release, verifies SHA-256 checksums, stores the standalone package under ~/.codex/packages/standalone, and installs the codex++ command into ~/.local/bin.
Environment variables:
CODEX_INSTALL_DIR- change the install directoryCODEX_BIN_NAME- override the command nameCODEX_RELEASE_REPOSITORY- override the release repository
cd codex-rs
cargo build --release --bin codex
# Binary appears at target/release/codex
# Copy or symlink it as codex++ to match the fork release command nameThe standalone installers download from https://releases.openai.com/codex by default and fall back to GitHub Releases if a metadata or asset download is unavailable. To force GitHub Releases, set CODEX_INSTALLER_USE_RELEASES_OPENAI_COM to false (0 and no are also accepted):
curl -fsSL https://chatgpt.com/codex/install.sh | CODEX_INSTALLER_USE_RELEASES_OPENAI_COM=false sh$env:CODEX_INSTALLER_USE_RELEASES_OPENAI_COM='false'; irm https://chatgpt.com/codex/install.ps1 | iexCodex CLI can also be installed via the following package managers:
# Use with a Chat Completions provider
codex++ -m ollama/qwen3
codex++ -m deepseek/deepseek-chat
codex++ -m dashscope/qwen-plus
# Use with Anthropic
codex++ -m anthropic/claude-sonnet-4-20250514
# Use with reasoning effort control
codex++ -m deepseek/deepseek-chat --reasoning-effort low
codex++ -m anthropic/claude-sonnet-4-20250514 --reasoning-effort highCodex++ uses config.toml (same location as upstream: ~/.codex/config.toml). Add provider blocks to configure third-party models:
# Chat Completions provider (Ollama, vLLM, DeepSeek, etc.)
[model_provider.ollama]
name = "Ollama"
base_url = "http://localhost:11434/v1"
env_key = "OLLAMA_API_KEY"
wire_api = "chat"
# Anthropic (Claude)
[model_provider.anthropic]
name = "Anthropic"
base_url = "https://api.anthropic.com"
env_key = "ANTHROPIC_API_KEY"
env_key_auth = "x-api-key"
wire_api = "anthropic"
# DashScope (Qwen) with thinking enabled
[model_provider.dashscope]
name = "DashScope"
base_url = "https://dashscope.aliyuncs.com/compatible-mode/v1"
env_key = "DASHSCOPE_API_KEY"
wire_api = "chat"
extra_body = { "enable_thinking" = true }Upstream model metadata can select the multi-agent v2 tool protocol. V2 uses Responses API-specific tool namespaces and marks inter-agent message fields as encrypted, which many third-party providers do not support. Codex++ lets an explicit local setting take precedence over that model metadata:
[features]
multi_agent = true
multi_agent_v2 = falseWith multi_agent left enabled (the default), Codex continues using its regular multi-agent function tools. Set multi_agent = false as well to disable multi-agent entirely.
See codex-rs/README.md for full configuration reference including extra_body, extra_headers, env_key_auth, request_max_retry_delay_ms, and reasoning effort mapping.
All features from openai/codex are inherited unchanged. See the upstream documentation for details on config, MCP, notifications, sandbox, exec, and more.
- Codex++ Technical Reference - detailed wire API docs, configuration, and code organization
- Upstream Codex Documentation
- Contributing
- Installing & building
- Open source fund
This repository is licensed under the Apache-2.0 License.
