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
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: An agent bot that installs and drives Codex on its own (Melvin Vivas on X · notes), Asking a Coder bot to install Codex (Melvin Vivas on X · notes), Sign in with ChatGPT: Setting Usage Limits for Each App (Melvin Vivas on X · notes), Codex Cloud Environments Must Be Saved & Published Before Use (Melvin Vivas on X · notes) and 240 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