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
相关推荐
irislinAmelia5 分钟前
汽车产线端侧AI视觉质检完整指南
人工智能·汽车
Highcharts.js9 分钟前
CSUN 2026|Highcharts无障碍数据与AI分享
javascript·人工智能·数据分析·highcharts·图表开发
J-JunLiang13 分钟前
提示词修炼手册-04-让AI先想后说
人工智能·提示词工程·agent prompt·agent提问·提示词修炼手册
終不似少年遊*18 分钟前
【Skill】为中型研发团队制作的敏捷迭代AI副驾Skill
人工智能·python·华为云·agent·ai编程·skill
爱吃火鸡面呀23 分钟前
BERT 从入门到实战:为什么需要它、核心原理与工程落地全解析
人工智能·自然语言处理·bert
电子科技圈25 分钟前
2026 RISC-V中国峰会观察:编译调试工具链的“在场节奏”,释放了什么信号?
大数据·人工智能·设计模式·软件工程·软件构建·代码规范·risc-v
紧跟先前的步伐27 分钟前
Go AI Agent 实战 22|完善 Agent 执行循环:从工具调用到最终回答
人工智能·ai·golang
IT智慧客073128 分钟前
前端 AI 面试题:从基础原理到工程实践的完整题库
人工智能
紧固件情报站30 分钟前
紧固件报价逻辑重构:成本、合规与智能博弈
大数据·人工智能·重构
FastCAE202238 分钟前
FastCAE AI应用助手重构(一)架构与桥接详解
人工智能·重构·架构