Codex
Codex CLI supports any OpenAI-compatible provider. Add DeepNexus to its config to run Codex on DeepSeek, GLM, Kimi, Qwen and the other DeepNexus models.
1. Set your API key
export DEEPNEXUS_API_KEY="sk-dn-..."
Add the line to ~/.zshrc or ~/.bashrc to make it permanent.
2. Configure the provider
Edit ~/.codex/config.toml:
model = "deepseek-v4-pro"
model_provider = "deepnexus"
[model_providers.deepnexus]
name = "DeepNexus"
base_url = "http://localhost:3000/v1"
env_key = "DEEPNEXUS_API_KEY"
wire_api = "chat"
3. Run
codex
Switch model for a single run with codex -m kimi-k3, or use profiles:
[profiles.fast]
model = "deepseek-v4.1-flash"
model_provider = "deepnexus"
[profiles.deep]
model = "deepseek-v4-pro"
model_provider = "deepnexus"
codex --profile fast
Add the MCP server (optional)
[mcp_servers.deepnexus]
url = "http://localhost:3000/mcp"
bearer_token_env_var = "DEEPNEXUS_API_KEY"
Recommended models
| Task | Model |
|---|---|
| Large refactors, debugging | deepseek-v4-pro, kimi-k3 |
| Everyday edits | glm-5.3, qwen3.8-max |
| Quick questions, scripts | deepseek-v4.1-flash |