explaingit

lucasmantou/codex-proxy

Analysis updated 2026-05-18

47PythonAudience · developerComplexity · 2/5LicenseSetup · moderate

TLDR

A local proxy server that lets OpenAI's Codex app talk to cheaper alternative AI models by translating between API formats.

Mindmap

mindmap
  root((codex-proxy))
    What it does
      Translates API requests
      Bridges Codex to other models
      Streams responses
    Tech stack
      Python
    Use cases
      Lower AI costs
      Use alternative providers
      Keep Codex workflow
    Audience
      Developers
      Vibe coders
    Details
      Responses API
      Chat Completions API
      MIT licensed

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Run Codex against a cheaper alternative AI model instead of OpenAI's own models

USE CASE 2

Keep using the Codex desktop app while routing requests through a different provider

USE CASE 3

Translate streaming responses and reasoning data between API formats automatically

USE CASE 4

Reduce per-request AI costs without changing your Codex workflow

What is it built with?

Python

How does it compare?

lucasmantou/codex-proxybetta-tech/harness-sdddevelp10/rustinterviewquiestions
Stars474648
LanguagePythonPythonPython
Setup difficultymoderateeasymoderate
Complexity2/52/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Runs as a local background Python process, requires configuring Codex to point at it.

MIT license: use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

Codex Proxy is a small local server that acts as a translator between OpenAI's Codex desktop application and alternative, cheaper AI models. Codex is a desktop coding assistant from OpenAI, but it is designed to only communicate with OpenAI's API, which can be expensive. This proxy runs on your own computer and intercepts Codex's requests, translating them into a format that other AI providers understand, then translates the response back so Codex receives what it expects. The technical problem it solves is that Codex uses a newer API format called the Responses API, while most alternative AI providers use an older format called the Chat Completions API. These two formats speak different "languages," so you cannot simply swap the API endpoint URL. The proxy handles this translation automatically, including details like streaming responses (where text arrives in chunks as it is generated) and reasoning chain data from models that show their step-by-step thinking. By routing through models with lower pricing, the proxy's author claims you can reduce costs by 30 to 50 times compared to using Codex with OpenAI's own models. The proxy adds only about 50 to 100 milliseconds of extra delay per request since it is only doing format translation. You run the proxy as a background Python process on your local machine, then configure Codex to point at it instead of directly at OpenAI. The proxy is written in Python and licensed under MIT.

Copy-paste prompts

Prompt 1
How do I run codex-proxy locally and point Codex at it instead of OpenAI?
Prompt 2
Explain how this proxy translates the Responses API into the Chat Completions API.
Prompt 3
What does this proxy do with streaming responses and reasoning chain data?
Prompt 4
How much added delay does routing through this proxy typically introduce?

Frequently asked questions

What is codex-proxy?

A local proxy server that lets OpenAI's Codex app talk to cheaper alternative AI models by translating between API formats.

What language is codex-proxy written in?

Mainly Python. The stack also includes Python.

What license does codex-proxy use?

MIT license: use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is codex-proxy to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is codex-proxy for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.