DeepSeek now documents a native Responses API route for Codex. Use https://api.deepseek.com with the responses wire format and a DeepSeek API key. Codex connectivity does not mean every built-in Codex tool is supported by the provider.
Configure Codex for DeepSeek
- Check your DeepSeek API account and current model pricing. Consumer chat access is separate from API billing.
- Follow DeepSeek's official Codex setup for the CLI, desktop app or VS Code extension. The docs say these clients share the Codex configuration.
- Choose
deepseek-flashordeepseek-v4-pro. The official page also provides a manual configuration, which requires bothconfig.tomland a model catalog inmodels.json.
The key configuration fields look like this. This is a fragment, not the complete manual setup: the model catalog is also required.
model = "deepseek-flash"
model_provider = "deepseek"
preferred_auth_method = "apikey"
forced_login_method = "api"
model_catalog_json = "~/.codex/models.json"
[model_providers.deepseek]
name = "DeepSeek"
base_url = "https://api.deepseek.com/"
wire_api = "responses"
experimental_bearer_token = "YOUR_DEEPSEEK_API_KEY"DeepSeek's setup script backs up config.toml, writes models.json and edits the existing configuration. Its docs say conflicting fields may be removed, so inspect the change if you keep custom Codex settings. The manual example stores the key in config.toml; keep that file private and out of Git.
DeepSeek's Codex integration and complete manual configuration · Current DeepSeek model names and pricing
Choose by the feature you need
deepseek-flash: supports image input. It does not run Responses APIweb_search.deepseek-v4-pro: supports provider-sideweb_search. DeepSeek bills these searches separately according to its current Search API terms.- Both models: support function tools. The only supported custom tool is
apply_patch.
The current model page uses the name deepseek-flash; DeepSeek says it is served by DeepSeek-V4.1-Flash-1017. Older Flash aliases may still be accepted but are retired names.
Check these Responses API limits
- Built-in tools:
file_search,code_interpreter,computer_use,mcpand other built-in tool types are ignored. - Files: file inputs are unsupported. The documented image input is available with
deepseek-flash. - Conversation state: the API is stateless.
previous_response_idandconversationare unsupported;storeis always false. - Context overflow:
truncationis unsupported; a request beyond the context window returns HTTP 400. - Silent ignores: unsupported request parameters may be ignored without an error. A successful HTTP response alone does not prove the requested feature ran.
- Streaming: watch for
response.completed,response.incompleteorresponse.failed. The Responses stream does not end withdata: [DONE].
These are provider-documented boundaries, not a live test of every Codex version. Check the latest DeepSeek Responses API compatibility reference if a tool or parameter behaves differently.
Keep the API routes separate
This Codex setup uses your own DeepSeek account, API key and billing. ChinaGenAI's free site endpoint currently exposes OpenAI-compatible Chat Completions; it is not the Responses API endpoint Codex needs. Check the site API compatibility notes before selecting a different route.
For DeepSeek's Chat Completions base URL, API key and model setup, see DeepSeek API setup. For a Codex custom-provider environment-key error, use the Codex CLI key troubleshooting guide.
Official DeepSeek documentation checked . Configuration and feature notes may change as the provider updates its API.