codex报错解决 Error loading config.toml: `wire_api = “chat“` is no longer supported

1. 引入

根据参考1,将"阿里云百炼Coding Plan"接入codex,配置完成后,启动codex时,报错如下:

复制代码
(base) C:\Users\xxx>codex
Error loading config.toml: `wire_api = "chat"` is no longer supported.
How to fix: set `wire_api = "responses"` in your provider config.
More info: https://github.com/openai/codex/discussions/7782
in `model_providers.Model_Studio_Coding_Plan.wire_api`

该报错的原因,是因为较新版本codex,比如 0.123.0 ,已经不支持"阿里云百炼Coding Plan"的API的这种用法了。如果强行将 C:\Users\xxx\.codex\config.toml 中的配置修改,wire_api = "responses",则也会报错:

复制代码
unexpected status 404 Not Found: Unknown error, url: https://coding.dashscope.aliyuncs.com/v1/responses

2. 解决方法

这个问题,本质上,是"阿里云百炼Coding Plan"的API不支持codex新版本的用法。所以将codex降级后就能使用,具体方法:

复制代码
npm install -g @openai/codex@0.80.0

降级到 0.80.0,将C:\Users\xxx\.codex\config.toml 中的配置,设置:wire_api = "chat"

codex启动后,也会报警如下,但不影响实际使用:

复制代码
⚠ Support for the "chat" wire API is deprecated and will soon be removed. Update your model provider definition in
config.toml to use wire_api = "responses".

参考

  1. https://help.aliyun.com/zh/model-studio/codex-coding-plan
相关推荐
email4u16 小时前
当 AI 开始解决数学难题
人工智能·数学
天天代码码天天16 小时前
我做了 5 个 PP-OCR 开源项目:从 OpenCV、TensorRT 到纯 C / 纯 Java 自研推理引擎
人工智能
a努力。16 小时前
DeepAgent记忆与技能的双重通道机制揭秘
人工智能
朝阳资本论16 小时前
海天,希望是淘大终点
人工智能
石小千16 小时前
GPU(单3090 24G) 部署千问模型
ai
AI棒棒牛16 小时前
YOLO26最新创新改进系列:融合 E3AD 认知注意力 Neck:具身认知增强的 FPN/PAN 特征选择机制,高效创新!
人工智能·yolo·计算机视觉·yolo26
Rocktech_ruixun16 小时前
机器人集群调度方案硬件如何选型?瑞迅科技RK3588/3576/3568分级方案解析
人工智能·嵌入式硬件·机器人·边缘计算
子非鱼eva16 小时前
昇腾开源仓Issue分析解答-Ascend精选(一)
人工智能·ai
武子康16 小时前
Data Parallel 深入解析:把请求分给真正有余量的副本
人工智能·llm·agent
Seoyoneh17 小时前
2026年呼叫中心选型技术指南:架构、API与高可用维度的评估清单
人工智能·信息与通信·通信