Hydra LLM Router for Codex Desktop

Why: I built Hydra because Codex Desktop is a great harness, but I wanted to use it interchangably with local LLM models on my Apple Silicon MacBook.

How: Hydra reads available models and configurations from LM Studio, Ollama and the OpenAI models. It injects emulated tools like web_search for local models that are normally only availble to OpenAI models. It fixes inconsistencies with thinking modes. It reads MCPs and tools from Codex. It normalizes and combines all of it into a model cache json file and serves it to Codex Desktop through it’s toml configuration.

What: Hydra lets you use Codex Desktop with LM Studio, Ollama or existing OpenAI models right from the Codex model switcher.

Here’s what it looks like in the Codex Desktop model selector.

Using Hydra in Codex Desktop

There are quite a lot of nuances and edge cases to make this compatible across multiple model providers into Codex Desktop’s requirements.

Hydra runs on MacOS with a .command file for easy launching. It also features a menubar item.

The Hydra menubar

The project is here.