whatisgithub

What is codex-shim?

0xsero/codex-shim — explained in plain English

Analysis updated 2026-05-18

398PythonAudience · developerComplexity · 3/5Setup · moderate

In one sentence

Codex-shim is a local Python server that lets Codex Desktop connect to any AI model provider, not just the approved list, by pretending to be the official API.

Mindmap

mindmap
  root((codex shim))
    What it does
      Local proxy server
      Mimics official API
      Routes to any provider
      macOS allowlist patch
    Tech stack
      Python
      Local server
    Use cases
      Use own API keys
      ChatGPT subscription routing
      Unlock hidden models
    Audience
      Codex Desktop users
      Developers with own API keys
      Mac silicon users

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

Connect Codex Desktop to Anthropic, DeepSeek, or other model providers instead of the built-in approved list.

USE CASE 2

Route a synthetic model slot to a ChatGPT subscription instead of using API credits.

USE CASE 3

Unlock hidden models in Codex Desktop's picker on macOS by patching the app's allowlist.

What is it built with?

Python

How does it compare?

0xsero/codex-shimevilsocket/auditjmmy9609-design/gpt-pp
Stars398397396
LanguagePythonPythonPython
Setup difficultymoderatemoderatemoderate
Complexity3/54/54/5
Audiencedeveloperdeveloperops devops

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

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires Python 3.11+, macOS allowlist patching involves unpacking, editing, and re-signing app files.

No license information is stated in the README.

So what is it?

Codex Desktop is an AI coding application that only lets you use a short list of models that its developers have approved. If you have API keys for other AI providers, such as Anthropic, DeepSeek, or others, there is no built-in way to swap them in. Codex-shim is a small local Python server that works around this limitation by pretending to be the official API that Codex connects to, then quietly routing your requests to whichever model you actually want to use. The setup works by running the shim as a background process on your own computer. Codex Desktop talks to it instead of to OpenAI's servers. The shim reads a settings file that lists your own models and API keys, translates Codex's requests into the format each provider expects, sends them off, and translates the responses back before handing them to Codex. Supported upstream providers include OpenAI, Anthropic-compatible endpoints, and a generic format used by many other providers. Your API keys stay in your own settings file and are never written into any generated catalog file. If you have a ChatGPT subscription with Codex access, the shim can also route a synthetic model slot directly to ChatGPT's servers, using your subscription quota rather than API credits. On macOS, there is an additional step required to make models actually appear in the picker inside Codex Desktop. The app has an allowlist built into its packaged files that hides any model not on a hardcoded list. The README includes step-by-step instructions for unpacking those app files, modifying one line to disable the allowlist, repacking everything, updating a security hash in the app's settings file, and re-signing the app so it will launch. The instructions also cover how to roll back the change. The shim was tested on Codex Desktop version 0.133.0-alpha.1 on a Mac with Apple silicon. Linux and Windows users can skip the app-patching section and use the shim itself without modification. The project requires Python 3.11 or newer.

Copy-paste prompts

Prompt 1
Walk me through setting up codex-shim's settings file to add my own Anthropic API key as a model option.
Prompt 2
Explain how codex-shim translates requests between Codex Desktop's expected format and other provider APIs.
Prompt 3
What are the steps to patch the macOS Codex Desktop allowlist described in this README, and how do I roll it back?
Prompt 4
How does routing a synthetic model slot to a ChatGPT subscription work instead of paying per API call?

Frequently asked questions

What is codex-shim?

Codex-shim is a local Python server that lets Codex Desktop connect to any AI model provider, not just the approved list, by pretending to be the official API.

What language is codex-shim written in?

Mainly Python. The stack also includes Python.

What license does codex-shim use?

No license information is stated in the README.

How hard is codex-shim to set up?

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

Who is codex-shim for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.