clodex
Bridge Claude Code to OpenAI models — OpenAI API key or ChatGPT/Codex-plan OAuth
Bridge OpenAI and Codex models into Claude Code with clodex
clodex lets you use ChatGPT, Codex plan, or OpenAI API models as first-class choices inside Claude Code, without breaking Anthropic's terms of service.
What clodex does
clodex connects alternative model providers to Claude Code so they appear as native model choices. You can drive Claude Code with your ChatGPT or Codex plan, an OpenAI API key, or OpenCode Go models in the main session, in subagents, in workflows, and in agent teams. The tool feeds these providers through Claude Code's own system prompt, so the rest of the experience stays the same. The author states this works with an existing Claude Code plan and with Codex plans while respecting Anthropic's terms of service, and that it avoids running CMUX or child Codex processes. The README notes you can have models such as Fable and Sol work together on hard problems once both are bridged in. clodex is derived from the earlier relay-ai project, then modified and streamlined for this single use case, and the original commit history is preserved. That lineage matters if you want to trace how the integration handles token flow and model validation. Contributions are accepted, and the project documents a quality bar for pull requests in its CONTRIBUTING file, so outside changes go through a defined review. The net effect is that a team already paying for a Codex plan can let Claude Code use those models without a second billing path or a fragile wrapper process.
Setup and the model picker
The quick start has five steps. Install puts the clodex command on your PATH. Sign in opens a device-code OAuth flow for your ChatGPT or Codex plan and stores the token in your operating system credential store. If a workspace admin has turned off device-code authorization, you add a browser flag to sign in through the browser instead. API-key users run a providers add command rather than the OAuth flow. Pick models opens an interactive manager where you mark up to 20 favorites and assign short aliases such as sol so you do not type long model names. Favorites drive the model switch menu, proxy-mode routing, and the patcher. Patch is optional but recommended for proxy mode. It bakes your favorites and aliases into the Claude Code binary so they pass model validation, show up in the model command, and report real context windows. You re-run patch after each claude update, and a restore flag undoes the change. Launch then starts Claude Code bridged to the model you choose. The README is explicit that patching is required if you want clodex-routed models to work as subagents through the Agent tool, which is a detail worth noting before you rely on multi-agent setups. The whole flow is designed so the token never leaves your credential store in plaintext.
Providers and the local endpoint
Three providers are listed. OpenAI with an API key is fully supported by the clodex maintainer. OpenAI through a ChatGPT or Codex plan using OAuth is also fully supported by the maintainer. OpenCode Go with an API key is community supported and maintained by its contributor rather than the core team. The README includes a supported providers table that maps each provider to its auth method and support level, so you can see at a glance which paths the maintainer stands behind. Beyond the direct bridge, clodex can run as a local OpenAI-compatible endpoint in front of your Codex plan. Any OpenAI-compatible client on your machine can then call it, which is useful when you want a second tool to reach the same models without its own provider integration. The endpoint mode and the direct bridge share the same favorites and aliases, so the model picker stays consistent across both. This design keeps configuration in one place and avoids duplicating tokens or credentials between tools that you already use. A communication section also notes the project welcomes contributions, which suggests the provider list may grow as community members add support for more backends over time. The maintainer-backed providers are the ones to trust for production work, while the community one is best for experimentation.
Editorial conclusion
clodex is published under the MIT license and written in TypeScript, with OpenCode Go support maintained by its community.
Community notes