Which models to use in Codex CLI: Kimi K2.7 Code, DeepSeek V4 Pro, GLM 5.2 and others

Coding with AICodex CLI·· 5 views· 3 min read

Codex works with the catalogue text models that support tools (function calling): it needs them to read files, edit and run commands. These are the ones we recommend for coding. They are all in the catalogue, support tools and are part of the Coding Plan.

The recommended models

Model Context What for
moonshotai/kimi-k2.7-code 262,144 tokens Made for coding: the best starting point for everyday work.
deepseek-ai/deepseek-v4-pro 1,048,576 tokens Strong reasoning, for large changes and hard bugs.
zai-org/glm-5.2 1,048,576 tokens Built for agents: uses tools well in long tasks.
qwen/qwen3.8-max 1,000,000 tokens A large model, for reasoning and code across whole projects.
deepseek-ai/deepseek-v4-flash 1,048,576 tokens Fast and cheap, for background tasks and short questions.
zai-org/glm-5.3-flash 1,048,576 tokens Light and cheap, good for simple edits.

Setting the model in Codex

The starting model goes in the model line of ~/.codex/config.toml:

model = "moonshotai/kimi-k2.7-code"

For another one in a single session: codex -m deepseek-ai/deepseek-v4-pro. Use the id exactly as it is, with the slash. See using another model for one session.

How to choose

1 Start with moonshotai/kimi-k2.7-code, made for coding.
2 Move to deepseek-ai/deepseek-v4-pro for a big change or a hard bug.
3 For long tasks, with many tools in a row, try zai-org/glm-5.2.
4 Use deepseek-ai/deepseek-v4-flash or zai-org/glm-5.3-flash for short questions and simple edits: they are fast and cheap.

Seeing the full list and the prices

The ids are in the Models tab of All in One AI or in the API list. On Linux and macOS:

curl "https://api.mozout.co.mz/v1/models?type=text" -H "Authorization: Bearer $MOZOUT_API_KEY"

In Windows PowerShell:

curl.exe "https://api.mozout.co.mz/v1/models?type=text" -H "Authorization: Bearer $env:MOZOUT_API_KEY"

Each model comes with its id (always with the slash), its context_length and its price in pricing. Listing the models spends no credits.

With the Coding Plan, requests to the models in the plan spend points instead of credits, and stronger models spend more points per token. The models that spend points are in the Plan tab.

A model without tools cannot edit files or run commands in Codex. If in doubt, stick to the models in this table.

Want to code with AI in Codex? Visit the Coding with AI page.

See Coding with AI

SEE ALSO

Codex CLI with All in One AI: creating config.toml, the key and the model

Using another model for one Codex session: codex -m

Choosing a text model: price, context window and what each one is for

Coding Plan: which plan to choose, what it costs and how to subscribe

Coding with AI in All in One AI

RECOMMENDED PRODUCT

Web hosting with cPanel

Domain and SSL included, daily backups and the panel you already know. from $6.60/mo (3-year plan, with coupon)

See plans
Was this answer helpful? Your answer helps us improve this article.