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
相关推荐
马***41114 小时前
适配成人英语学习痛点,打造落地性强的学习辅助方式
人工智能·学习
夜焱辰14 小时前
浏览器端 Agent 的文件版本管理:不用 Git,基于 OPFS + SQLite 自己造了一个
前端·人工智能
Ricky055314 小时前
CTRL-WORLD:一种用于机器人操控的可控生成世界模型(中美2025年联合研究)
人工智能·机器人·世界模型
jeffer_liu14 小时前
Spring AI 生产级实战:工具调用
java·人工智能·后端·spring·ai编程
阿乔外贸日记14 小时前
2026尼日利亚五项清关政策更新,拉高能源装备进口综合成本
大数据·人工智能·搜索引擎·智能手机·云计算·能源
民乐团扒谱机15 小时前
【AI笔记】短时纯音时长对音高感知偏移效应研究综述
人工智能·笔记
侃谈科技圈15 小时前
破除数据中台落地困境:2026数据治理平台差异化能力与选型决策指南
大数据·人工智能
大象说15 小时前
Python多进程共享队列无报错僵死 120G Nginx访问日志清洗踩坑全记录
人工智能·自然语言处理
Cosolar15 小时前
AutoGen 精通教程:从零到企业级多 Agent 系统架构师
人工智能·后端·面试
甲维斯15 小时前
Claude Code 省钱小妙招!200K和自动压缩
人工智能