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
相关推荐
代码方舟7 分钟前
零信任架构实战:基于天远车辆过户详版查询构建自动化车源估值核验网关
人工智能·架构·自动化·excel
布吉岛的石头21 分钟前
Java 程序员第 52 阶段8:Prompt 约束:限定范围与格式
人工智能·深度学习·transformer
DKPT31 分钟前
AI编程助手新利器skills火爆登场
人工智能·笔记·学习·开源·ai编程
米米商聊32 分钟前
AI 搜群附件,同一份 PDF 占满前三条?按附件 ID 折叠片段
javascript·人工智能
羲云网络1 小时前
GPT Image 2.6 设备操作说明配图:步骤拆分、结构保留与事实验收
人工智能·图像编辑·技术写作·gpt image 2.6
扶尔魔ocy1 小时前
【QT opencv】几何量测(一)--比例尺方式测量尺寸
人工智能·opencv·计算机视觉
日月新著1 小时前
Mac装AI工具,一次把6个环境配好
人工智能·aigc
极客先躯1 小时前
智能体开发高级面试每日一题|2026-06-05|什么是 Agentic AI 与传统 RPA 的区别?
人工智能·ai·代理模式·rpa·每日一题·高级面试·智能体开发
琪宝5851 小时前
AI大模型应用开发 001|Python 环境搭建零基础第一课:Windows/Mac 全平台安装与避坑
人工智能·windows·python
Wellijohn1 小时前
不登录、不上传、不订阅:我开源了一个跑在自己电脑上的 AI 办公工作台
人工智能·开源·aigc