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
相关推荐
工作log2 小时前
基于 RuoYi-Vue-Plus + DeepSeek 实现 AI 在线考试系统(试卷生成与批量阅卷
人工智能
Web3VentureView2 小时前
SYNBO亮相香港《前瞻》活动,联手HashKey共筑链上原生一级市场新范式
人工智能·web3·区块链·加密货币·synbo
沪漂阿龙2 小时前
深度强化学习入门:从倒立摆游戏看懂AI如何“自己学会走路”
人工智能·游戏
gongfuyd2 小时前
MAPPO中V(s)作为基线的含义及基线定义
人工智能
jinanwuhuaguo2 小时前
OpenClaw范式深度剖析:从技术突破到安全治理的系统性研究(第二篇)
开发语言·人工智能·安全·架构·kotlin·openclaw
knight_9___2 小时前
RAG面试篇7
java·面试·agent·rag·智能体
Lugas Luo2 小时前
如何利用AI Agent自动分析Linux BSP(Board Support Package)驱动和内核日志
linux·人工智能·嵌入式硬件
互联网推荐官2 小时前
物联网应用开发实战:从协议选型到平台落地的工程路径解析
人工智能
呆呆敲代码的小Y2 小时前
【Unity实战篇】| YooAsset + UOS CDN 云服务资源部署,实现正式热更流程
人工智能·游戏·unity·游戏引擎·免费游戏