codex访问deepseek

发布时间:2026/5/27 6:43:28

codex访问deepseek Codex 通过 CC-Switch 接入 CCX 最终调用 DeepSeek 的完整链路本质是解决 Codex 的 Responses API 与 DeepSeek 的 Chat Completions API 协议不兼容问题。核心逻辑是CCX 作为协议转换层将 Codex 的高级 Agent 请求“降级”为 DeepSeek 能理解的对话格式而 CC-Switch 仅负责配置管理实操步骤1github下载ccx2命令行安装codex3准备cc-switch4准备deepseek的key第一步安装启动ccx1访问github方案1下载安装包方案2下载zip目前用的方案2然后用trae启动项目方案3下载git代码2启动项目配置密钥2.1核心配置:选择codex2.2注意每个圈中部分3配置cc-switch3.1测试点击获取列表正常3.2核心配置必须通过配置 显式禁用 WebSocketsupports_websockets false强制 Codex 跳过重连步骤直接使用 HTTPS 通道。否则每次请求都会卡在 5 次重连环节4常见错误5常见错误和处理方案5.1忘了ccx密码CCX 的管理密码直接由根目录下的 .env 文件定义常见参数名包括旧版本KEY123456默认值通常为 123456。新版本ADMIN_ACCESS_KEYyour-admin-secret-key需手动设置。5.2报错 400 Bad Request 或 invalid model原因CCX 渠道类型错误选择了 Responses (Codex)。解决进入 CCX 管理界面 → 编辑渠道 → 强制切换为 OpenAI Chat 协议。5.3回复一个字好ERROR: Reconnecting... 2/5ERROR: Reconnecting... 3/5ERROR: Reconnecting... 4/5ERROR: Reconnecting... 5/5解决方案配置3.25.4回复一个字好ERROR: Reconnecting... 1/5ERROR: Reconnecting... 2/5ERROR: Reconnecting... 3/5ERROR: Reconnecting... 4/5ERROR: Reconnecting... 5/5ERROR: unexpected status 503 Service Unavailable: {code:NO_RESPONSES_UPSTREAM,error:未配置任何 Responses 渠道请先在管理界面添加渠道}, url: http://127.0.0.1:3000/v1/responsesERROR: unexpected status 503 Service Unavailable: {code:NO_RESPONSES_UPSTREAM,error:未配置任何 Responses 渠道请先在管理界面添加渠道}, url: http://127.0.0.1:3000/v1/responses解决方案5.5ERROR: {error:{message:Failed to deserialize the JSON body into the target type: messages[1].role: unknown variant developer, expected one of system, user, assistant, tool, latest_reminder at line 1 column 26755,type:invalid_request_error,param:null,code:invalid_request_error}}解决方案关键步骤1. 在 ccx 中启用角色规范化操作路径ccx 管理界面 → 对应 DeepSeek 渠道的 Edit → 勾选 Normalize non-standard chat roles。作用自动将 developer、coder 等非常规角色 映射为标准角色通常转为 user 或 assistant。确保请求符合 DeepSeek 的协议要求避免反序列化错误。5.6ERROR: {error:{message:The supported API model names are deepseek-v4-pro or deepseek-v4-flash, but you passed gpt-5.5.,type:invalid_request_error,param:null,code:invalid_request_error}}解决方案增加模型转换5.7目前是codex 访问ccswitch,访问ccx访问deepseek:\Users\Lenovocodex exec --skip-git-repo-check 回复一个字好OpenAI Codex v0.125.0 (research preview)--------workdir: C:\Users\Lenovomodel: deepseek-v4-proprovider: ccswitch_httpapproval: neversandbox: workspace-write [workdir, /tmp, $TMPDIR, C:\Users\Lenovo\.codex\memories]reasoning effort: nonereasoning summaries: nonesession id: 019e61ea-f970-7e83-a5b3-9b533f4f9f08--------user回复一个字好The user is asking me to reply with a single character: 好 (which means okay/good in Chinese).codex好2026-05-26T01:34:13.360898Z ERROR codex_core::session: failed to record rollout items: thread 019e61ea-f970-7e83-a5b3-9b533f4f9f08 not foundtokens used29解答codex exec --skip-git-repo-check 回复一个字好测试时这是正常现象5.8查看ccx请求日志

相关新闻