Skip to content

[Bug] DeepSeek flash 家族已支持图片输入,但 LiveAgent 仍把 DeepSeek 一律当纯文本 #795

Description

@coder-hhx

Affected area

Model providers

Version or commit

main@63f655d0(v1.3.x 开发线;DeepSeek 正式供应商自 #502 / #554 起走原生 Responses)

Environment

  • OS: macOS(Apple Silicon),桌面端
  • Deployment: desktop app
  • Model provider: DeepSeek 官方(https://api.deepseek.com),模型 deepseek-flash

Steps to reproduce

  1. 在设置里配置 DeepSeek 官方供应商,选 deepseek-flash(或目录里的 deepseek-v4-flash)。
  2. 任选一种方式给模型一张图:
    • 在对话里直接粘贴/上传一张图片;
    • 或让 Agent 执行会产出图片的动作,例如 Read 一个图片文件、Browser 截图(工具结果里带 image 块)。
  3. 观察发出去的请求与模型的实际回答。

Expected behavior

deepseek-flash 能把图片当输入消费。官方《图像理解》指南明确该模型支持三种传图方式(base64 data URL、外部图片 URL、Files API file_id),并说明 input_image 内容块可出现在 user / developer 消息以及 function_call_output / custom_tool_call_output 的 output 中;指南同时注明旧模型名 deepseek-v4-flash-vision-exp 已下线、其请求同样由最新 Flash 模型承接。

https://api-docs.deepseek.com/zh-cn/guides/vision

Actual behavior

图片被 LiveAgent 自己拦下,与上游能力无关:

  • 工具结果图片被强制降级deepSeekNative.ts 在发请求前用 omitToolResultImages(context, model.id) 无条件把 image 块换成说明文字,因此 Read 图片文件 / Browser 截图之后模型只看到文字,看不到图,只能建议用户"换一个支持视觉的模型"。
  • 用户上传的图片直接报错assertNoUserImageInput 在 user 消息带 image 块时 throw "DeepSeek Responses does not support image input.",请求根本不发出。
  • 能力声明过期modelFactory.ts 的 deepseek 分支写死 input: ["text"],且显式排除用户 inputModalities 覆盖(注释理由是"deepseek 的 wire 层硬拒绝图片")。该假设成立于只有 -vision-exp 实验模型吃图的时期,现已不成立。
  • 附件内联被挡nativeResponsesAttachments.ts 只放行 codex / xaiinput_image 内联,DeepSeek 的图片附件永远不会内联。

Logs / screenshots

工具结果图片在出站 context 里被替换成的说明文字(实测,模型侧只能看到这一段):

[1 image omitted from this tool result]
1. image/png (~20.6 KB)
The active model (deepseek-flash) does not accept image input, so the image bytes were not sent.
Do not repeat the same image-producing action expecting to see it. Rely on text output instead (for example a page snapshot or file text), or ask the user to switch to a vision-capable model.

模型目录快照里 DeepSeek 也仍是纯文本(crates/agent-ui/src/lib/models/catalog.generated.tsdeepseek-v4-flashinputModalities: ["text"]),但该目录由 models.dev 生成,不应作为拦图的依据——请求路径一直读的是 modelFactory 的硬编码值。

Pre-submit checklist

  • I searched existing issues and pull requests and found no duplicates.
  • This is not a security vulnerability.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions