PitchHut logo
Seamlessly integrate any LLM with OpenAI Codex and Claude Code.
Pitch

opencodex serves as a universal provider proxy for OpenAI Codex and Claude Code, allowing users to leverage any LLM while maintaining the familiar Codex workflow. It simplifies integration with various models like Claude, Gemini, and Ollama, offering robust functionality including account management and support for multiple sessions.

Description

Enhance Your LLM Experience with opencodex

opencodex is a universal provider proxy designed to connect various Large Language Models (LLMs) with OpenAI's Codex and Claude Code. This lightweight local proxy allows seamless interaction between Codex CLI, App, and SDK, and multiple LLM providers such as Claude, Gemini, Grok, DeepSeek, and more.

Key Features

  • Universal Compatibility: Utilize any LLM available on the market with the Codex environment, eliminating the need to rely on a single service provider. This includes support for over 40 different providers out-of-the-box.
  • Dual Functionality: Easily switch between using Codex or Claude Code, ensuring versatility in model usage.
  • Account Pool Management: opencodex includes a feature that allows you to manage multiple ChatGPT accounts efficiently. Implement auto-routing for new sessions to the least utilized account while keeping existing Codex threads linked to their specific accounts.

How It Works

The architecture is designed for flexibility:

flowchart LR
  codex[Codex session<br/>CLI, App, SSH, mobile] --> proxy[opencodex]
  proxy --> existing{Existing thread?}
  existing -->|yes| pinned[Keep the same<br/>ChatGPT account]
  existing -->|new session| quota[Refresh quota<br/>5h, weekly, 30d]
  quota --> pick[Pick lowest-usage<br/>healthy account]
  pick --> upstream[ChatGPT / Codex backend]
  pinned --> upstream
  upstream --> outcomes[Quota / auth outcome]
  outcomes -->|429| cooldown[Cooldown + failover]
  outcomes -->|401 / 403| reauth[Mark reauth needed]
  cooldown --> quota

This design allows opencodex to translate Codex's Requests API into a language understood by any LLM provider, ensuring all features—streaming, tool calls, and reasoning tokens—function smoothly.

Installation and Quick Start

Install opencodex via npm with the following command:

npm install -g @bitkyc08/opencodex

Then initialize the setup:

ocx init

Start the proxy with:

ocx start

This sets up an interactive environment where Codex routes through the opencodex proxy.

Dashboard and Provider Integration

The opencodex dashboard provides a user-friendly interface to add providers, view usage statistics, and manage your settings interactively. New providers can be added easily, with auto-discovery of models from the provider's API endpoint.

Seamless Model Routing

Directly access any configured provider and model using the provider/model syntax, with all routed models appearing within the Codex App model picker:

# Example commands to leverage routed models:
codex -m "anthropic/claude-opus-4-8" "Explain this stack trace"
codex -m "google/gemini-3-pro" "Write unit tests for auth.ts"

Additional Considerations

  • opencodex supports macOS, Linux, and Windows, allowing for broad usability across different platforms.
  • Features built-in OAuth support for easier logins with various providers, and handles authentication and token management seamlessly.
  • All activities are logged, and ongoing sessions maintain their continuity, ensuring that chat history is preserved through transitions between different models and providers.

For comprehensive documentation, visit the opencodex documentation site. This extensive guide covers installation, configuration, and best practices for integrating opencodex into your workflow.

0 comments

No comments yet.

Sign in to be the first to comment.