How to Use DeepSeek with Codex CLI (Step-by-Step Setup Guide)

A step-by-step guide to configuring DeepSeek in Codex CLI, covering TOML settings, API key setup, profile switching, and practical tips for lowering AI coding costs with DeepSeek.

Aug 6, 2026 · 2 min read · 383 Words · -Views -Comments 🔒 · Programming
Codex DeepSeek AI 🇨🇳 阅读中文版
Read with AI

Choose an AI assistant

Only the public preview is included, not paid content.

ChatGPT Open in a new tab with the article link and prompt
Claude Copy the prompt, then open Claude

Open Claude
Trouble reading the article?

If the prompt is missing, copy the full prompt below into your AI assistant. If the AI cannot read the article, paste the visible passage you want to discuss and add your question.

Codex uses OpenAI models by default, but it also lets you configure a model provider to connect third-party models. I previously tried using DeepSeek with Claude Code and found the experience reasonably good. I recently discovered that Codex supports a similar setup, so this guide documents how to configure DeepSeek in Codex.

Last updated on: Aug 6, 2026

🔒

Premium Content

Subscribe for full site access, or buy this article

After subscribing, you will be signed in automatically. To cancel or manage the subscription, use the Stripe management entry at the bottom of the subscribe page.

Already purchased?

Enter the email used during purchase to restore access

Payment issues?
If you see 'payment blocked' or 'too risky', this is Stripe's automated fraud prevention — not a merchant decision. Common causes and fixes:

1. VPN / Proxy
Turn off your VPN or switch to a node matching your card's issuing country. IP-to-card country mismatch often triggers the block.

2. Card not enabled for international payments
Make sure your credit/debit card has international online transactions enabled — some banks disable this by default.

3. Try a different card
Prefer Visa / Mastercard credit cards. Prepaid or virtual cards are more likely to be blocked.

4. Browser issues
Try incognito/private mode, or a different browser. Some extensions can interfere with the payment flow.

5. Still not working?
Contact the author via PayPal to complete the payment.
Authors
Developer, digital product enthusiast, tinkerer, sharer, open source lover