DeepSeek V4 Pro can power Codex through DeepSeek's native Responses API support. The official model identifier is deepseek-v4-pro, and DeepSeek documents low, high, and max reasoning-effort settings. The safest setup is to back up the shared Codex configuration, choose either the reviewed setup script or the manual path, verify the provider and model with a small task, and check the live price table before a large agent run.
That wording is deliberate: DeepSeek V4 Pro is a model backend, while Codex is the agent harness operating on your files and tools. If those layers are still easy to mix up, start with agent harness versus model before changing the configuration.
Can Codex use DeepSeek V4 Pro?
Yes. DeepSeek's V4 Pro release announcement identifies deepseek-v4-pro as the API model and lists low, high, and max reasoning effort. DeepSeek's separate official Codex integration guide says its API supports the Responses API that Codex uses.
This does not turn DeepSeek V4 Pro into an OpenAI model, and it does not mean that DeepSeek, OpenAI, or Agent.Space jointly operates the integration. Codex is being configured to call a third-party model provider through a compatible API surface. Billing, model behavior, availability, and data handling therefore need to be evaluated under the provider account you configure.
Before you change the Codex configuration
Do four things before setup:
- Launch Codex once. DeepSeek's guide expects the Codex configuration directory to exist before its setup flow modifies it.
- Back up
~/.codex/config.toml. That file is not limited to one terminal session. According to the integration guide, Codex CLI, the Codex experience in the ChatGPT desktop app, and the Codex IDE extension share it. - Prepare a DeepSeek API key without exposing it. Do not paste the key into a repository, screenshot, article, ticket, or shared shell history. DeepSeek's current manual example stores the credential in
~/.codex/config.toml; treat that file as a secret, restrict access, and never commit, screenshot, or share it. - Decide whether you trust an automated script to edit the shared file. The official setup script is convenient, but reviewing what a downloaded script changes is a sensible security step. The manual path is slower and easier to audit.
A backup is not busywork here. Changing the provider can affect more than the Codex window in front of you, and the documented session behavior depends on the active login/configuration route.
Two official setup paths
DeepSeek documents an automated path and a manual path. Both should end with the same four pieces of state: DeepSeek as the provider, https://api.deepseek.com/ as the provider base URL, responses as the wire API, and deepseek-v4-pro as the model you intend to use.
Option 1: review and use the official setup script
The current guide provides separate scripts for macOS/Linux and Windows. It says the script asks for an API key, backs up the existing configuration, writes the model catalog used by Codex, updates config.toml, and validates the result.
Open the current DeepSeek Codex setup page rather than copying a command from an old post. Inspect the script if your environment requires change review, then follow the matching operating-system instructions. After it finishes, confirm that the active model is deepseek-v4-pro; the example or default model in a setup tool may not be the one this guide is about.
Option 2: configure the provider manually
Use the manual section of the same official guide when you want to understand every change. At a minimum, verify:
- the top-level model points to
deepseek-v4-pro; - the selected provider is DeepSeek;
- the provider base URL is exactly the current DeepSeek API endpoint;
- the wire API is
responses; - the credential is stored only where the current official Codex/DeepSeek configuration expects it;
- any model-catalog file and context settings match the current official example rather than an older tutorial.
Avoid merging snippets from multiple guides. A partially updated provider block can look plausible while sending Codex to the wrong endpoint or model. Make one controlled change, save it, and start a new low-risk Codex task to verify the response.
Whichever route you choose, capture the pre-change backup path and the post-change provider/model names. Those two facts make rollback much easier than trying to reconstruct the previous state from memory.
Choose low, high, or max reasoning
DeepSeek documents three reasoning-effort choices for V4 Pro. It does not follow that every coding task should use max. A practical starting policy is:
This table is a workflow recommendation, not a vendor benchmark. The right setting depends on the repository, prompt, tools, and acceptance criteria. Begin with the lowest level that can reliably satisfy the task, verify the result with tests or review, and increase reasoning only when the failure mode calls for it.
How to think about pricing
Do not copy one token price into a spreadsheet and treat it as the cost of a coding task. DeepSeek's live API pricing page separates cached input, uncached input, and output pricing and may include time-dependent discounts. Those values and windows can change, so use the current table on the day you estimate or publish.
For an agent workflow, estimate these parts:
- Initial input: instructions, repository context, attached files, and system context.
- Repeated input: context sent again across turns; cache behavior can materially affect the effective input cost.
- Tool output: command results, diffs, and file contents that re-enter the context.
- Model output: explanations, plans, patches, and summaries.
- Retries and branches: failed attempts or parallel exploration can multiply the total even when the final answer is short.
- Reasoning policy: a harder setting may be worthwhile, but it should be an explicit decision rather than an invisible default.
The simplest useful estimate is a range: a normal run, a long-context run, and a retry-heavy run. Apply the current official input and output prices to each range, then set a spend or usage guard where the provider and client allow it. That produces a more honest decision than comparing only the headline output rate.
Shared config, sessions, and rollback
DeepSeek's guide says the supported Codex clients share ~/.codex/config.toml. Treat that as a configuration change with a wider blast radius:
- close or finish important active work before switching providers;
- keep the dated backup created before the change;
- record which model and provider the new session uses;
- do not delete the old configuration merely because old sessions are not visible under the new login route.
The same guide explains that session history is grouped by login method. A previous session can appear missing after a provider/login change and reappear when the earlier configuration is restored. That is an identity/configuration boundary, not evidence that the work was necessarily deleted.
If the new setup fails, roll back to the known backup, restart the relevant Codex client, and verify the provider and a previous session before making another change. Do not stack several guessed edits on top of a configuration that is already uncertain.
Is V4 Pro the right backend for your Codex workflow?
DeepSeek V4 Pro is a candidate, not an automatic default. Evaluate it against the work you actually run:
- Compatibility: does the current DeepSeek configuration work across the Codex client you use?
- Task quality: does the model meet your repository's tests and review criteria at an appropriate reasoning level?
- Cost visibility: can you estimate input, output, cache, and retry costs from real task traces?
- Operational boundary: are API-key handling, provider terms, and data routing acceptable for the project?
- Portability: can you switch models without rebuilding the workspace or losing the task context you need?
The DeepSeek harness guide for Agent.Space covers a different layer: using a DeepSeek-oriented agent environment rather than configuring DeepSeek V4 Pro behind Codex. For a broader API decision, the Agent.Space Developer API guide explains the model-discovery and configuration path. Always check the live catalog before assuming a particular model is available.
Conclusion
To use DeepSeek V4 Pro with Codex, back up the shared Codex configuration, follow one current official setup path, select deepseek-v4-pro, and verify it with a small reversible task. Choose reasoning effort deliberately, estimate full agent-loop cost from the live DeepSeek price table, and keep the previous configuration available for rollback.
If you want to compare this with an independent API route, check the current Agent.Space Developer API model catalog, configuration, and pricing. Availability can change, so treat the live page—not this article—as the final product-support check.
