通过 DeepSeek 连接模型服务
用户层 [model_providers.deepseek],base_url 是 https://api.deepseek.com/,wire_api = responses。env_key 读 DEEPSEEK_API_KEY,不要把 sk- 写进 TOML。
export DEEPSEEK_API_KEY=YOUR_DEEPSEEK_API_KEY
# ~/.codex/config.toml
[model_providers.deepseek]
name = "deepseek"
base_url = "https://api.deepseek.com/"
env_key = "DEEPSEEK_API_KEY"
wire_api = "responses"
# ~/.codex/deepseek.config.toml
model_provider = "deepseek"
model = "deepseek-flash"
preferred_auth_method = "apikey"
forced_login_method = "api"
model_reasoning_effort = "high"
web_search = "disabled"
model_catalog_json = "/home/YOU/.codex/models.json"
# 模型目录 JSON 从官方 Codex 页或一键脚本拿,不要抄人设长文
# bash <(curl -fsSL https://cdn.deepseek.com/api-docs/codex-deepseek-setup-en.sh)
codex --profile deepseek
# 不要:
# experimental_bearer_token = "sk-..."
# [profiles.deepseek]
# openai_base_url = "https://api.deepseek.com/"
# wire_api = "chat"
# plugin add deepseek@