makecindy / makecindy/cindy

Codex + Cindy AI 纯文本模型会把工具截图以 image_url 发给上游导致 400

Open
#2,907 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
2.7k
Forks
395
Avg merge
21h 48m
Merged PRs (30d)
776

Description

**客户端版本**: 0.1.52
**反馈类型**: bug

---

## 现象

Codex 走 Cindy AI 的 DeepSeek / GLM 等纯文本模型时,即使用户没上传任何图片,也会被上游 400拒掉。错误形如:

- DeepSeek:`messages[N]: unknown variant \`image_url\`, expected \`text\``
- GLM / Z.ai:`messages.content.type 参数非法,取值范围 ['text']`

对话气泡里看不到图。图来自 Codex 自己调 `view_image` / Playwright 截图后,工具结果里的 `input_image` / `image_url`。

## 复现步骤

1. 新建 Codex 任务,模型选 Cindy AI 的 DeepSeek V4 Flash(或 GLM 5.3)。
2. 让 Agent 用浏览器打开本地页面并截图验收(会触发 `view_image`)。
3. 等下一轮请求或点「重试」。

## 期望行为

纯文本模型不应收到 `image_url`。工具结果里的图应降级成占位文本,任务可继续,不要 400。

## 实际行为

下一轮被 LiteLLM 打回 400。同一条历史点重试仍会失败。

## 复现频率

稳定。只要 Codex 先看过图、再用 Cindy AI 纯文本模型继续,就会出。

## 已尝试

0.1.52 的 `#2805` 会把本地 Chat 桥上的工具图降成 `[media omitted]`。这条路不走那座桥:Cindy AI 的 Codex 默认仍是 Responses,图被原样转给网关 LiteLLM。自己填 DeepSeek / 智谱 Key 时走 `openai-chat`,修复会生效。

## 建议范围

只修 Cindy AI / XD 上 Codex 对纯文本模型的图降级或走本地 Chat 桥。不包括压缩熔断、协作者选型等其它问题。
---
**版本区域**: CN
**OS**: darwin arm64 (25.6.0)
**界面语言**: zh-CN

Contributor guide

Open the contributing guide

Research direction

Trace the Codex Responses path after view_image or Playwright produces input_image or image_url, then compare it with the local Chat bridge and openai-chat path described in the report. Verify with a Cindy AI DeepSeek or GLM text-model reproduction that image content becomes placeholder text and retries or next turns no longer return a LiteLLM 400.

Written by the indexing model from the issue text.

Assessment

Tech stack
playwright, typescript
Domain
ai, api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.