Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Claude Code Codex Gateway

GitHub stars Latest release License: MIT Windows

Use OpenAI Codex models inside Claude Desktop's Code workspace through a local Claude Code Router gateway on Windows—with Anthropic Messages compatibility, streaming, tool calling, reasoning presets, and automatic model fallback.

Highlights

  • Run Codex models from the Claude Desktop Code interface.
  • Anthropic /v1/messages to OpenAI Responses conversion through CCR.
  • Working streaming and agentic tool/function calls.
  • Explicit GPT-5.6 Sol Medium, High, and Max reasoning choices.
  • Automatic Sol → Terra → Luna fallback for eligible provider failures.
  • Localhost-only gateway with independent authentication for every user.
  • Repeatable Windows installer and troubleshooting commands.
  • No shared OAuth tokens, API keys, cookies, or account databases.
Claude Desktop Code
        |
        | Anthropic Messages API (streaming + tools)
        v
Claude Code Router on 127.0.0.1:3456
        |
        | OpenAI Responses conversion
        v
Locally authenticated Codex account

The bundle contains no API keys, OAuth tokens, cookies, CCR databases, usage logs, or credentials from the computer on which it was created.

Important

Every user must authenticate their own Codex account locally. This project does not bypass subscriptions, quotas, model access, or provider terms.

What this installs

  • @musistudio/claude-code-router version 3.0.20.
  • Local management commands under %USERPROFILE%\llm-gateway\scripts.
  • A desktop launcher named Claude Gateway.cmd.
  • Documentation and a routing reference.

CCR listens locally by default:

  • Model gateway: http://127.0.0.1:3456
  • Management UI: normally http://127.0.0.1:3458

Keep both listeners bound to localhost.

Prerequisites

  1. Windows 10 or Windows 11.
  2. PowerShell 5.1 or newer.
  3. Node.js 22 or newer.
  4. Claude Desktop with access to the Code workspace.
  5. Codex CLI installed and signed in with the friend's own ChatGPT/Codex account.

The Codex account must actually have access to the requested models. Model names and quotas can differ between accounts.

Quick start: Windows

Extract the ZIP, open PowerShell in the extracted directory, and run:

Set-ExecutionPolicy -Scope Process Bypass
.\Install.ps1

The installer checks prerequisites, installs the pinned CCR package, copies the helper files, adds the helper directory to the user PATH, and opens the local CCR UI.

Then follow docs/SETUP-GUIDE.md. Authentication must be performed by the friend directly on their computer.

Daily use

After configuration, double-click Claude Gateway.cmd on the desktop or run:

claude-gateway

Useful commands:

gateway-start    Start the gateway without opening the UI
gateway-stop     Stop the background gateway
gateway-ui       Open the local management UI
gateway-doctor   Check installation and local service state
claude-gateway   Launch Claude Desktop through the configured profile

Recommended picker entries

  • Codex API/gpt-5.6-sol-medium — everyday coding.
  • Codex API/gpt-5.6-sol-high — difficult debugging and architecture.
  • Codex API/gpt-5.6-sol-max — hardest tasks; slowest and most quota-intensive.

These are routing aliases. Each is rewritten to gpt-5.6-sol with a corresponding reasoning effort.

Files

  • Install.ps1 — repeatable Windows bootstrap.
  • config/provider-plan.json — credential-free configuration specification.
  • docs/SETUP-GUIDE.md — complete UI configuration procedure.
  • docs/HOW-IT-WORKS.md — architecture and routing explanation.
  • docs/TROUBLESHOOTING.md — common failures and fixes.
  • docs/SECURITY.md — credential-handling rules.
  • scripts/ — small management commands.

Upgrading

The kit pins CCR 3.0.20, the version against which these instructions were tested. Review release notes and back up CCR through its UI before upgrading:

npm install -g @musistudio/claude-code-router@latest

CCR project: https://github.com/musistudio/claude-code-router

Official references:

About

Run OpenAI Codex models in Claude Desktop Code through a local Claude Code Router gateway on Windows, with reasoning presets, streaming, tools, and automatic fallback.

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages