GitHub Issue

如何接入Codex?

Discovered On Apr 28, 2026
Primary Metric open
添加OpenAI格式的配置,到Codex,报错: ``` unexpected status 404 Not Found: Unknown error, url: https://api.deepseek.com/responses ``` 网上检索下,发现codex,已经不支持自己的chat/completions接口了,有点幽默🌚: [Deprecating `chat/completions` support in Codex · openai/codex · Discussion #7782](https://github.com/openai/codex/discussions/7782)
View Raw Thread

Developer & User Discourse

yuercl • Apr 28, 2026
不止是 chat/completions接口,还有很多地方不适配
cnazev • Apr 29, 2026
我昨晚问ds 还说最推荐codex使用,结果看官方文档里根本没有列出codex的配置方法......

昨晚是这么回答的

Codex (极其丝滑)

你只需要找到配置文件 (~/.codex/config.json),填入以下内容即可:
json

{
"model": "deepseek-chat",
"model_provider": "deepseek",
"model_providers": {
"deepseek": {
"name": "DeepSeek",
"baseURL": "https://api.deepseek.com/v1",
"envKey": "DEEPSEEK_API_KEY"
}
}
}

然后在终端里设置一下你的 API 密钥,就能立刻使用。
export DEEPSEEK_API_KEY="你的密钥"
codex

总结:就是填个配置、设个环境变量,一步到位。
ipcjs • Apr 29, 2026
> 我昨晚问ds 还说最推荐codex使用,结果看官方文档里根本没有列出codex的配置方法......

😄️,AI就是这样,不会的不会说不会,一定给你瞎编出来
rainnight2013 • Apr 29, 2026
> 添加OpenAI格式的配置,到Codex,报错:
>
> ```
> unexpected status 404 Not Found: Unknown error, url: https://api.deepseek.com/responses
> ```
>
> 网上检索下,发现codex,已经不支持自己的chat/completions接口了,有点幽默🌚: [Deprecating `chat/completions` support in Codex · openai/codex · Discussion #7782](https://github.com/openai/codex/discussions/7782)

所以现在就是codex没办法用ds的模型?
yuercl • Apr 29, 2026
做了一个deepseek codex cli的适配器:https://github.com/yuercl/deepseek-codex-adapter 。有bug的话,欢迎提issue和pr

I've created an adapter for the DeepSeek Codex CLI: https://github.com/yuercl/deepseek-codex-adapter. Please feel free to submit issues and pull requests if you find any bugs.