Skip to content

subscriptions-dot/codex-model-switcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Codex Model Switcher

Codex Model Switcher screenshot

Codex Model Switcher is a small macOS utility that lets you switch the Codex desktop app between local Ollama models and the original OpenAI Codex mode without typing terminal commands every time.

It is built for developers who use Codex daily and want a fast local-model toggle for Ollama-powered coding sessions.

Why This Exists

When you want Codex to use a local Ollama model, the command is easy to forget:

ollama launch codex-app --model gpt-oss:20b --yes

And when you want to go back to normal OpenAI Codex mode:

ollama launch codex-app --restore

This app wraps that workflow in a clean native UI.

Features

  • Detects installed Ollama models with ollama list
  • Shows models in a dropdown
  • Remembers your last selected model
  • Launches Codex with the selected Ollama model
  • Restores original OpenAI Codex mode
  • Quits Codex safely
  • Shows simple logs and errors
  • Includes model helper labels
  • Clean dark-mode friendly macOS interface
  • Includes a lightweight Windows PowerShell GUI version

Model Priority

On startup, the app auto-selects the best available model in this order:

  1. Your last selected model, if still installed
  2. gpt-oss:20b
  3. devstral-small-2:latest
  4. devstral-small-2
  5. gemma4:26b
  6. First available model

Included Model Labels

Model Label
gpt-oss:20b Recommended for Codex / balanced
devstral-small-2:latest Coding fallback
gemma4:26b Hindi / general chat
gemma4:latest Light general use

Download / Run

macOS

Open:

Mac/Codex Model Switcher.app

Or share:

Mac/Codex Model Switcher.zip

The macOS app is ad-hoc signed. For a completely warning-free public distribution on other Macs, Apple Developer ID notarization is required.

Windows

Open:

Windows/Launch Codex Model Switcher.bat

The Windows version is a lightweight PowerShell GUI with the same main actions.

Project Layout

CodexModelSwitcher/
├── Mac/
│   ├── Codex Model Switcher.app
│   ├── Codex Model Switcher.zip
│   └── README-Mac.txt
├── Windows/
│   ├── Codex Model Switcher.ps1
│   ├── Launch Codex Model Switcher.bat
│   ├── README-Windows.txt
│   └── Windows Codex Model Switcher.zip
└── Project/
    ├── Sources/
    ├── Assets/
    ├── Docs/
    ├── Tools/
    └── Package.swift

Commands Used

The app only uses local commands for this workflow:

ollama list
killall Codex || true
ollama launch codex-app --model MODEL_NAME --yes
ollama launch codex-app --restore
open -a Codex

No sudo. No model deletion. No manual modification of Codex files.

Build From Source

cd Project
swift build -c release

Main source files:

  • Project/Sources/CodexModelSwitcher/CodexModelSwitcherApp.swift
  • Project/Sources/CodexModelSwitcher/ContentView.swift
  • Project/Sources/CodexModelSwitcher/ShellRunner.swift
  • Project/Sources/CodexModelSwitcher/OllamaModelService.swift
  • Project/Sources/CodexModelSwitcher/CodexLauncher.swift

Requirements

  • macOS 13 or newer for the native app
  • Ollama installed
  • Codex desktop app installed
  • At least one Ollama model pulled

Recommended:

ollama pull gpt-oss:20b

Safety

This project is intentionally small and boring in the best way: it is a button-based wrapper around a few explicit local commands. It does not delete models, edit unrelated files, or require admin privileges.

Star The Repo

If this saves you from retyping the same Codex/Ollama commands every day, a star helps other developers find it.

About

Native macOS utility to switch Codex between local Ollama models and original OpenAI mode with one click.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors