@LD-090 在 分享使用CPA(CLIProxyAPI)将iflow接口转到Codex中的要点 中发帖
参照CPA官方文档配置,但有以下几点需要注意:
在系统存在代理配置的情况时,如果不想Codex走代理需要在环境变量配置NO_PROXY=IP或域名(多条用英文逗号分隔),否则会遇到stream disconnected before completion: error sending request for url (http://xxx/v1/responses)
由于codex在发送对话时使用的role是developer,而iflow仅支持system,需要提前转换请求体,否则会遇到stream disconnected before completion: stream closed before response.completed
在~/.codex/config.toml中base_url路径应该含v1
在~/.codex/config.toml中不能配置disable_...