OpenAI's Codex now lets you plug in DeepSeek, Claude, and local models
OpenAI just turned its Codex coding agent into a model-agnostic platform, letting developers plug in any third-party model compatible with its Responses API. By tweaking a config.toml file, you can now run Codex on DeepSeek, Gemini, or offline via local Ollama models. Why it matters: OpenAI is loosening ecosystem lock-in, giving developers the freedom to balance cost, performance, and privacy.
For months, developers using modern AI coding agents faced an annoying trade-off: if you liked a specific terminal workflow, you were married to that vendor's model and pricing.
OpenAI just broke that pattern. On June 17, developer Tibo posted a reminder on X that Codex CLI, Desktop, and SDK now officially support third-party models, freeing users from relying strictly on OpenAI's proprietary catalog.
To be clear, OpenAI did not open-source its GPT models. Instead, it opened up Codex's model integration layer by introducing a pluggable provider interface.
A quick config tweak opens the door
Plugging an alternative brain into Codex comes down to editing a single config.toml file. Configuration can sit at the user level, project root, or be passed straight into the command line.
Each provider entry takes a few core parameters: the endpoint address (base_url), your environment variable key (env_key), and the wire protocol (wire_api). Once registered, running Codex on an alternative engine is as simple as adding a provider flag to your prompt.
One technical catch to note: Codex dropped support for the older Chat Completions API in February 2026, meaning whatever third-party provider you point to must support the OpenAI Responses API standard. Popular hosted services like DeepSeek, GLM, and Qwen fit the bill, as do local inference engines like Ollama and LM Studio.
Developer Wei pointed out on X that you don't even need to edit the TOML file by hand. You can literally ask Codex to inspect its own config file and inject the credentials safely without overwriting existing settings.
Under the hood, Codex CLI is built in Rust (making up over 96% of the codebase) and ships as a standalone binary across macOS, Windows, and Linux. With more than 91,600 GitHub stars and hundreds of releases under its belt, it has already matured into a workhorse tool.
The contrast with Anthropic's walled garden
OpenAI's open-door move stands in sharp relief against Anthropic's recent moves with Claude Code.
While Claude Code remains restricted to Anthropic's native Opus and Sonnet models, developers had been hacking around the limitation by redirecting base URLs. Recent reports suggest Anthropic is actively closing those loopholes by introducing model whitelists inside its desktop client.
That tension even fueled the rise of community projects like CC Switch, a Tauri-based launcher with over 103,000 GitHub stars built specifically to manage API keys and model routing across fragmented CLI tools. By contrast, OpenAI decided to legitimize model swapping right out of the box.
Why it matters
We think this is one of the smartest ecosystem maneuvers OpenAI has pulled off lately.
For developers, the upside is immediate. You can route cheap boilerplate chores to DeepSeek, run sensitive internal repos entirely offline through a local Ollama instance, and bring in frontier models only when you hit complex architecture snags. You keep your Muscle memory in the terminal without being punished on your monthly API bill.
For the AI market, Codex is shedding its reputation as a thin wrapper designed to burn OpenAI tokens. It is morphing into a neutral, developer-first agent harness.
OpenAI might surrender some token margin to budget providers in the short term, but it gains something far more valuable: staying parked as the default command line interface on millions of engineering machines.
Sources (1)
- kocpc.com.tw(opens in a new tab)Originalkocpc.com.tw