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
相关推荐
_codemonster1 分钟前
手语识别及翻译项目实战系列--认识CSL2018数据集
人工智能·深度学习
ACP广源盛139246256733 分钟前
2026 PCIe互连芯片@ACP#国产替代格局解析:芯动科技领跑高端交换芯片赛道
大数据·网络·数据库·人工智能·分布式·嵌入式硬件
DevNo7 分钟前
2026年校园AI课堂系统应用观察与选型思路
人工智能
VIP_CQCRE9 分钟前
用 Cherry Studio 接入 Ace Data Cloud:一个 Token 打通 Claude、GPT、Gemini、DeepSeek 等主流模型
ai·大模型·api·cherry studio·ace data cloud
Canace10 分钟前
用 AI 写了一天代码,为什么反而更累了?
前端·人工智能·ai编程
动物园猫14 分钟前
课堂行为目标检测数据集:6类别、2,000张图像 | 目标检测
人工智能·目标检测·计算机视觉
半兽先生19 分钟前
MinerU + LibreOffice 混合架构:搞定 .doc/.ppt 旧格式文档解析与切片
人工智能·python·机器学习·ai·架构
崖边看雾20 分钟前
机器学习——K-Means(啤酒数据集挖掘)
人工智能·机器学习·kmeans
王莹月20 分钟前
文生图接口的提示词写多长合适?nano banana pro / gpt-image-2 实测长度与负面词
gpt·ai·chatgpt·ai作画·aigc·agi
听你说3223 分钟前
常青课堂同步HR系统考勤休假二百余项升级 万古科技智能排班系统赋能用户精细化用工
大数据·人工智能·科技