文章内容
2025/11/11 19:59:17,作 者: 黄兵
Codex stream error: error sending request for url
最近在使用 Codex 的时候出现了:
⚠️ stream error: error sending request for url (https://api.openai.com/v1/responses); retrying 1/5
in 212ms…
⚠️ stream error: error sending request for url (https://api.openai.com/v1/responses); retrying 2/5
in 368ms…
⚠️ stream error: error sending request for url (https://api.openai.com/v1/responses); retrying 3/5
in 873ms…
⚠️ stream error: error sending request for url (https://api.openai.com/v1/responses); retrying 4/5
in 1.705s…
⚠️ stream error: error sending request for url (https://api.openai.com/v1/responses); retrying 5/5
in 3.33s…
有的时候也会是这样的错误内容:
■ error sending request for url (https://api.openai.com/v1/responses)
Connection failed: error sending request for url (https://api.openai.com/v1/responses)
出现这个问题的原因
使用了代理,但是在 Codex CLI 中没有设置代理。
解决方案:
设置代理,如果您使用的代理本地端口是 10808,截图如下:

在 Windows 系统中设置如下:
set HTTP_PROXY=http://127.0.0.1:10808 set HTTPS_PROXY=http://127.0.0.1:10808
如果是在 PowerShell 中运行:
$env:HTTP_PROXY="http://127.0.0.1:10808" $env:HTTPS_PROXY="http://127.0.0.1:10808"
但是有一点需要注意:
这样设置只管当前窗口,如果关闭了 CMD 窗口,下次启动需要重新设置。
其它相关推荐:
1、Codex 折腾
评论列表