explaingit

keksuccino/better-codex-app-custom-provider-support

Analysis updated 2026-05-18

35PythonAudience · developerComplexity · 3/5Setup · moderate

TLDR

An unofficial macOS patch for the ChatGPT/Codex desktop app that adds per-task custom model provider selection, like OpenRouter, without logging out of ChatGPT.

Mindmap

mindmap
  root((Codex Provider Patch))
    What it does
      Adds provider menu
      Routes tasks per provider
      Keeps ChatGPT login
    Tech stack
      Python
      Electron
      macOS
    Use cases
      Use OpenRouter models
      Add custom models
      Store keys in Keychain
    Audience
      Codex power users
      macOS developers

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

Route individual Codex tasks to a custom model provider like OpenRouter while staying signed into ChatGPT.

USE CASE 2

Add custom models to the Codex desktop app's model catalog that aren't part of the default OpenAI lineup.

USE CASE 3

Store a custom provider's API key securely in the macOS Keychain instead of a config file.

USE CASE 4

Re-patch the app after a ChatGPT update replaces the modified files.

What is it built with?

PythonElectronmacOS

How does it compare?

keksuccino/better-codex-app-custom-provider-supportalex-nlp/denoiserlbytedance-seed/cola-dlm
Stars353535
LanguagePythonPythonPython
Setup difficultymoderatehardhard
Complexity3/55/54/5
Audiencedeveloperresearcherresearcher

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

How do you get it running?

Difficulty · moderate Time to first run · 30min

macOS only, unofficial patch to the installed app that must be re-applied after every ChatGPT update, used at your own risk.

In plain English

This project is an unofficial patch for the macOS ChatGPT and Codex desktop app that lets you pick a different AI model provider for each new task, without having to sign out of your regular ChatGPT account. Normally the desktop app only talks to OpenAI's own models through your logged in account, but this patch adds a provider menu on top of that, so you can send a task to something like OpenRouter instead while still keeping your OpenAI login active for tasks that should stay on ChatGPT's own models. The patch works by modifying the installed app directly. A Python installer script closes the running app, makes a full backup of it first, edits the app's packaged code, updates the integrity metadata Electron apps use to verify their own files have not been tampered with, and then re-signs the app so macOS will still run it. Because it edits the actual installed application rather than replacing it, the author warns that any future ChatGPT update will overwrite the patch, so the installer needs to be run again after each update, and that the tool stops itself rather than risk breaking the app if an update changes the code it expects to find. Setting up a custom provider means adding it to Codex's own configuration file, giving it a name, an API endpoint, and a way to read your API key, ideally from the Mac Keychain rather than typed directly into a config file. You can also add extra models that are not part of the default OpenAI lineup by exporting the built in model list, copying an entry with similar capabilities, and adjusting its name and details for the new model. A separate JSON file that the installer creates controls exactly which providers show up in the desktop menu and which specific models are automatically routed to which provider. One clear limitation is that once a conversation has started, the provider used for that conversation cannot be changed. The project only supports macOS for now, and the author is explicit that this is an unofficial, unsupported modification, used entirely at the user's own risk, with the possibility of losing chat history or running into problems with the ChatGPT account if something goes wrong.

Copy-paste prompts

Prompt 1
Walk me through running patch_chatgpt_providers.py to add OpenRouter as a custom provider in ChatGPT desktop.
Prompt 2
Help me configure a custom model provider in ~/.codex/config.toml for this patch.
Prompt 3
Explain how desktop-model-providers.json controls which provider each model uses.
Prompt 4
Show me how to add a custom model to Codex's model catalog for use with this patch.

Frequently asked questions

What is better-codex-app-custom-provider-support?

An unofficial macOS patch for the ChatGPT/Codex desktop app that adds per-task custom model provider selection, like OpenRouter, without logging out of ChatGPT.

What language is better-codex-app-custom-provider-support written in?

Mainly Python. The stack also includes Python, Electron, macOS.

How hard is better-codex-app-custom-provider-support to set up?

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

Who is better-codex-app-custom-provider-support for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.