Disclaimer (May 2026). Sorry for the long radio silence on the comments, busy stretch on my side. I no longer use this setup and stopped tracking it actively. I'm refreshing the page out of thoroughness because comments kept coming in and people deserve an honest snapshot. If you find better workarounds, post them in the comments and I'll link them, but I won't be maintaining this further.
Codex deprecated wire_api = "chat" in favour of OpenAI's Responses API. DeepSeek only speaks Chat Completions, so the direct integration documented below is no longer reliable. Symptoms reported by users:
An assistant message with 'tool_calls' must be followed by tool messages...(insufficient tool messages following tool_calls)Missing 'reasoning_content' field in the assistant message at message index N- Deprecation warning for the
chatwire API
If you want Codex + DeepSeek today, you need a translation layer (see Workarounds). If you just want to use DeepSeek for coding, there are now better paths (see Alternatives).
I haven't validated any of these personally. Credits in parentheses point to the comment thread below.
- OpenRouter with BYOK. Point Codex at OpenRouter and bring your DeepSeek key. Routes through OpenRouter's Responses implementation while billing your DeepSeek credits. Free under 1M requests/month at the time of writing. (via @CrushedAsian255)
- codeproxy-ai/cli. Local proxy specifically built to make DeepSeek usable inside Codex: https://github.com/codeproxy-ai/cli (via @mushan0x0)
- LiteLLM. Translates between OpenAI format and arbitrary backends. Run it locally and point Codex at
http://localhost:4000: https://github.com/BerriAI/litellm (via @LMCom) - dyrnq/ai-adapter. Notes and tests for Codex + DeepSeek V4 Pro: dyrnq/ai-adapter#3 (via @dyrnq)
model = "gpt-5.1-codex"
[model_providers.deepseek]
name = "DeepSeek"
base_url = "https://api.deepseek.com/v1"
env_key = "DEEPSEEK_API_KEY"
wire_api = "chat"
[model_providers.deepseek-reasoner]
name = "DeepSeek Reasoner"
base_url = "https://api.deepseek.com/v1"
env_key = "DEEPSEEK_API_KEY"
wire_api = "chat"
[profiles.deepseek]
model = "deepseek-chat"
model_provider = "deepseek"
[profiles.deepseek-r1]
model = "deepseek-reasoner"
model_provider = "deepseek-reasoner"codex # default, OpenAI
codex --profile deepseek # DeepSeek Chat
codex -p deepseek-r1 # DeepSeek Reasonerexport DEEPSEEK_API_KEY="your-deepseek-api-key"Add the same line to ~/.bashrc or ~/.zshrc. Place the TOML above at ~/.codex/config.toml.
If the goal is "use DeepSeek for coding", these need no proxy.
- Claude Code. Native DeepSeek V4 support (reported by @emergencescience).
- Aider. Native DeepSeek support.
- Continue. Native DeepSeek support.
- deepseek-code. Open-source Python CLI built directly on the DeepSeek API, agent-loop with file/shell/search tools and a permission system. I contributed multiline input upstream and tested it; I'm not running it day-to-day anymore, but last time I used it the basics worked.
- DeepSeek API directly. If you don't need a CLI wrapper.
Looks like many of us are seeing the DeepSeek API down — I’ve experienced the same. Maybe we can follow a systematic troubleshooting guide whenever the API goes down:
If everything above looks correct but it’s still down, wait a while — sometimes the service may be overloaded or under maintenance (others have reported similar outages).
Optionally, implement fallback logic or retry mechanism in your code so your application can handle temporary downtime gracefully or follow step by steps instructions as given on deepseek api down related blog.
If others have additional tips — logging, rate‑limit checks or alternate endpoints — sharing them here might help the community avoid hours of frustration 🙂