Codex
Connect Codex directly to dheeX using the Responses API.
Export your key as DHEEX_API_KEY. With Codex CLI 0.163.0 or later, create ~/.codex/dheex.config.toml using the configuration below. The hosted model catalog lets /model list models available to your key and select their supported reasoning levels. Remove any inherited model_catalog_json setting so Codex fetches the catalog from dheeX.
model = "deepseek-ai/DeepSeek-V4.1-Flash-1017"
model_provider = "dheeX"
web_search = "disabled"
model_reasoning_effort = "high"
plan_mode_reasoning_effort = "high"
model_context_window = 1048576
model_auto_compact_token_limit = 1032192
[model_providers.dheeX]
name = "dheeX"
base_url = "https://api.dheex.ai/v1"
env_key = "DHEEX_API_KEY"
model_catalog_url = "https://api.dheex.ai/codex/models"
wire_api = "responses"
requires_openai_auth = false
supports_websockets = falseStart a new session with this profile:
codex --profile dheexRun /model, choose DeepSeek V4.1 Flash, and select none, low, high, or max reasoning. Max is under More reasoning… in the reasoning menu. Restart Codex after changing the profile. The catalog authenticates with the same API key as inference; no separate login or download is needed.
Built-in web search must be disabled for this connection. The gateway uses a Responses adapter for Chat Completions, which accepts function tools but rejects the native web_search tool. Cached search also sends this tool. Do not add --search.
These options follow DeepSeek's thinking mode: none turns thinking off; low, high, and max turn it on at the selected effort. The default is high. Codex sends the selection as the Responses API's reasoning.effort field.
This deployment accepts these four values. Inherited medium or xhigh settings return HTTP 400 with "Invalid request". Set plan_mode_reasoning_effort = "high" to keep Plan mode from selecting an unsupported effort independently of model_reasoning_effort. Keep both settings above the provider table. The model catalog selects ordinary function tools and disables the unsupported freeform patch tool. Codex can edit files through shell tools.
Ask Codex to read a file and summarize it. Confirm the request appears in your dheeX usage.