GoForum › 🌐 V2EX
怎么配置 codex?
kkcity ·
2026-02-02 20:57 ·
0 次点赞 · 0 条回复
我是这么配的:
- 修改 .zshrc 加入以下两行:
export OPENAI_BASE_URL=https://api.hodlai.fun/v1
export OPENAI_API_KEY=sk-<api-key>
- 修改 .codex/auth.json 如下:
{
"OPENAI_API_KEY": "sk-<api-key>"
}
同样的配置在 mac 上可以工作,在 linux 上不工作,错误信息是:
■ stream disconnected before completion: error sending request for url ( https://api.hodlai.fun/v1/responses)
而用下面的 curl 命令可以工作:
curl https://api.hodlai.fun/v1/responses \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.2",
"input": "Hello!"
}'
codex 版本都是 0.93.0. 有大佬知道原因吗?
0 条回复
添加回复
你还需要 登录
后发表回复