Using Custom and Open Models in OpenAI Codex via config.toml
Melvin Vivas · X post · 2026-06-18 · Open on X
Topics: AI Dev Tools & Productivity · Level: intermediate
Summary
Codex now supports custom models, so you can run open models through other providers. The quoted tip says the easiest setup is to have Codex edit its own configuration file at ~/.codex/config.toml, so you don't have to edit it by hand.
Key points
- Codex now supports custom model configurations, including open models from third-party providers.
- Custom model settings live in ~/.codex/config.toml.
- Tip: ask Codex to do it for you, e.g. 'Please read ~/.codex/config.toml and help me add the custom model configuration.'
- The change also applies to Codex Desktop.
- The creator's open question is which providers actually work, so test your provider before relying on it.
Resources mentioned
- OpenAI Codex · tool · openai.com · paid · recommended by both Bashiri Smith & Melvin Vivas
OpenAI's coding agent. In the diagram it writes code, fixes review findings and drives the build loop. The creator also used it to make this video.
Also in: Developers moving from ChatGPT/Codex to Claude (Melvin Vivas on X · notes), Creator Opinion: Codex Is Still the Best at Computer Use (Melvin Vivas on X · notes), OpenAI Codex Ambassador applications are open (Melvin Vivas on X · notes), GPT-Live-1.1: Multilingual Voice Update for ChatGPT and Codex (Melvin Vivas on X · notes) and 264 more
Try this
- Ask Codex to read ~/.codex/config.toml and add a custom model configuration for you
- Test which open-model providers work with Codex
More in AI Dev Tools & Productivity
- Codex Record & Replay: Turn a Demonstrated Workflow into a Reusable Skill
- Claude Code Artifacts: Shareable Interactive Pages from Your Session
- Trying the new Projects feature in Grok Imagine
- Grok Imagine: xAI's AI Video Generator (Short Demo Reaction)
- Claude Design Is Now in the Claude Desktop App
- New Claude Design Features: Design Systems, Canvas Editing, Claude Code Sync