How to Set DeepSeek as the Default Model in ChatGPT Codex

Developers can configure OpenAI's Codex coding agent to use DeepSeek as its default model instead of the built-in option. The process involves generating a DeepSeek API key from the developer dashboard and setting it as an environment variable on the local machine. Users must then update the Codex configuration file at ~/.codex/config.toml to point to the DeepSeek API endpoint and a custom model catalog. A separate models.json file is created to define the model's capabilities, including context window size, reasoning levels, and tool support. Once both files are saved and Codex is restarted, DeepSeek-Flash appears as the active default model, switching billing from a flat monthly subscription to pay-per-use API charges.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in