codex-proxy  by icebear0828

Local proxy for AI programming models, compatible with OpenAI APIs

Created 1 month ago
534 stars

Top 59.3% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

Codex Proxy is a lightweight local service translating Codex Desktop's Responses API into standard OpenAI, Anthropic, and Gemini protocols. It enables seamless integration with AI clients, acting as a personalized AI programming assistant gateway.

How It Works

This project acts as an intermediary, converting client requests (OpenAI, Anthropic, Gemini) to Codex Desktop API format and vice-versa, supporting SSE streaming. It employs advanced anti-detection techniques, including Chrome TLS fingerprinting via curl-impersonate, request header spoofing, and cookie persistence, to mimic real Codex Desktop behavior. Key features include robust account management, multi-account rotation, plan routing, and automatic token renewal.

Quick Start & Requirements

  • Prerequisites: ChatGPT account, Node.js 18+ (20+ recommended), curl. Docker is optional.
  • Installation: Offers desktop application (Windows, macOS, Linux), Docker, or source compilation.
  • Access: Control panel at http://localhost:8080.
  • Docs: Release downloads and CHANGELOG.md available.

Highlighted Details

  • Full Protocol Compatibility: Supports OpenAI (/v1/chat/completions), Anthropic (/v1/messages), Gemini, and direct Codex (/v1/responses) APIs with SSE streaming.
  • Advanced Account Management: Features OAuth PKCE login, multi-account rotation, plan routing, token auto-renewal, ban detection, and quota management.
  • Anti-Detection: Utilizes curl-impersonate for TLS fingerprinting, spoofs desktop headers, persists cookies, and auto-updates fingerprint versions.
  • Model Support: Wide range of GPT-5 variants and OSS models with configurable reasoning levels and "fast" modes.
  • Function Calling: Native support for function_call / tool_calls across all protocols.

Maintenance & Community

No specific maintainer or community details beyond a mention of a WeChat group for assistance. Updates are tracked in CHANGELOG.md.

Licensing & Compatibility

  • License: Non-Commercial (非商业许可).
  • Restrictions: Prohibits commercial use (selling, reselling, paid proxy, commercial product integration). Permitted for personal learning, research, and self-deployment. Users must comply with OpenAI's terms of service.

Limitations & Caveats

curl-impersonate is unavailable on Windows; Docker is recommended. Codex API is stream-only; stream: false requests collect the full stream before returning JSON. Project depends on Codex Desktop's public interfaces; upstream updates may require proxy adjustments.

Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
176
Issues (30d)
89
Star History
494 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.