DeepSeek 模型走 Codex/Responses 接口时报 Unsupported custom tool: 'exec',应改用 openai-completions 路由

Open
#9,874 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript

Research direction

The report identifies the DeepSeek model catalog or routing configuration as the likely entry point, but does not name a file. Find where the Codex channel selects the deepseek-openai-responses profile, then trace how provider capabilities determine the interface profile. Done means DeepSeek Codex uses a tool-compatible route and tool calls no longer fail with the reported unsupported exec error.

Written by the indexing model from the issue text.

Description

bug

提交人: 匿名
客户端版本: 0.1.130


现象

在 Cindy 中选择 DeepSeek-V4.1-Flash(Codex 运行时)进行对话时,只要模型尝试调用工具,请求就被拒绝,回复未完成:

{"error":{"message":"Unsupported custom tool: 'exec'. Only 'apply_patch' is supported. (request_id: ...)","type":"invalid_request_error","code":"invalid_request_error"}}

复现条件

  • 模型:DeepSeek-V4.1-Flash(deepseek-flash,供应商 deepseek)
  • 运行时:Codex,接口 profile 为 deepseek-openai-responses(openai-responses,直连 api.deepseek.com)
  • 会话记录显示 model_provider: cindy_gateway、model: deepseek-flash
  • 纯文本对话正常;一旦模型发起工具调用即 100% 失败

原因分析

Codex 运行时会将 exec(shell_type: unified_exec)作为自定义工具随 Responses 请求发送,而 DeepSeek 服务端的 Responses 端点仅接受 apply_patch 一种自定义工具,于是整个请求被以 invalid_request_error 拒绝。同一模型换 Claude 等运行时(或 openai-completions 接口)无此问题,Claude + Codex 正常工作。

建议

将 DeepSeek 的 Codex 通道默认接口从 deepseek-openai-responses 改为 deepseek-openai-completions(标准函数调用工具,DeepSeek 完整支持),或对不支持 exec 自定义工具的服务端不下发该工具。

本地排查记录(供参考)

用户侧已确认:无自定义扩展;修改本地模型目录缓存与接口快照将偏好切到 completions 后,新建对话仍被应用重新生成为 responses 路由,说明偏好由应用内置/服务端目录下发,本地无法修正。

提交时的任务环境

仅代表提交时快照,不一定是故障环境。OS 来自提交客户端本机,不含 SSH 远端主机;Harness / 模型来自当前任务。与运行环境无关的反馈可忽略本段。
版本区域: CN
OS: win32 x64 (10.0.19045)
Harness: Pi
Model ID: z-ai/glm-5.3-flash
界面语言: zh-CN

Dominant language
TypeScript
Stars
2.8k
Forks
412
Avg merge
12h 7m
Merged PRs (30d)
671

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from makecindy/cindy

All issues in makecindy/cindy

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.