All integrations

OpenAI Codex CLI integration

Use DeepSeek in OpenAI Codex CLI with Tokuse

Codex CLI supports custom OpenAI-compatible providers. Use wire_api = "chat" with Tokuse. The responses endpoint currently returns convert_request_failed for the DeepSeek channel, so a responses config will not work. Keep the base URL at https://tokuse.com/v1.

Settings

Provider ID
tokuse
Base URL
https://tokuse.com/v1
Model
deepseek-flash
Wire API
chat
Env key
TOKUSE_API_KEY
OpenAI auth
false

Setup steps

  1. Create a Tokuse API key in the Tokuse console.
  2. Add the [model_providers.tokuse] block to ~/.codex/config.toml.
  3. Export TOKUSE_API_KEY in the shell that starts Codex.
  4. Run codex. Use codex -m deepseek-v4-pro when a task needs the heavier model.
  5. Keep any existing provider blocks; switch model_provider to tokuse only when you want DeepSeek.

~/.codex/config.toml

model = "deepseek-flash"
model_provider = "tokuse"

[model_providers.tokuse]
name = "Tokuse"
base_url = "https://tokuse.com/v1"
env_key = "TOKUSE_API_KEY"
wire_api = "chat"
requires_openai_auth = false

Shell

export TOKUSE_API_KEY="sk-your-tokuse-key"

codex

# Optional heavier model:
codex -m deepseek-v4-pro

Before production use

  • Keep the Tokuse key on the server or in the tool's secret store.
  • Use the base URL exactly as shown in Settings; do not append a full endpoint path.
  • Verify the model alias in the current Tokuse catalog.
  • Test errors, timeout behavior, and cost with a small workload first.

Related tools

Create Tokuse account