When it comes to Codex, most of us are just happy to run the latest version of GPT. While OpenAI has very generous limits, you could hit them for long projects. The good news is it is possible to use other models with it. OpenAI has posted an advanced configuration document that shows you how to run any LLM on Codex. With profiles, you can save your configuration layers and switch between them. You will just have to create a different TOML file for each profile.

The key thing to understand is Codex uses config.toml for configuration. It supports OpenAI, Ollama, and LM Studio but can add additional models by giving your base_url and model name. With this approach, it is possible to use DeepSeek V4 Pro and other similar models.
WHAAAT?!
TIL you can run any LLM on Codex 🤯
A lot of devs (including me!) still thought Codex was completely locked into OpenAI’s ecosystem.
It isn’t.
You can completely bypass the default models and run the exact stack you want for your workflow.
Here is what the routing… pic.twitter.com/xwZSM1hh2N
— Charly Wargnier (@DataChaz) June 18, 2026

