[Feature Request] 历史消息含图片时,允许切换到纯文本模型 / Allow switching image-containing sessions to text-only models #1986
yuejianli-z
started this conversation in
Ideas
Replies: 2 comments 1 reply
|
技术原因很直接:会话里已存在的 image content block 要求当前模型具备视觉能力;切成纯文本模型后,历史消息里的图片块会变成该模型不支持的输入,provider 直接报错。 现在的可行路径:
值得做的官方改进:模型切换时检测历史图片块并给出选项("切换到纯文本模型将剥离 N 个图片块,历史图片将以附件引用保留,确认?"),剥离而不是报错。这个交互成本很低,PR 通道开了可以提。 |
1 reply
|
这个切换场景现在有一个不改 DeepSeek Harness core 的可用解法: dsh plugin --profile web add pi2dsh@0.11.0重启后,模型选择器里会出现 DeepSeek + Vision Bridge 分组。需要从带图历史切到
如果后续还要继续理解新图片,可再装 真实 Web 复现、公开视觉端点配置和截图:https://github.com/weijiafu14/pi2dsh/tree/main/examples/vision-bridge |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi DeepSeek Harness 团队,使用过程中发现一个与模型切换有关的问题,想在这里反馈一下。
问题描述
在历史消息中包含图片的会话里,尝试切换到不支持图片输入的模型时,操作会被直接拒绝,无法完成切换。
复现步骤
在会话中发送一张图片。
图片相关问题处理完毕后,尝试切换到 DeepSeek V4 Flash 等不支持图片输入的模型。
切换被拒绝,报错:
Model "deepseek-v4-flash" does not accept image input, but this session already contains images; select an image-capable model.推测的原因
检查相关代码后发现,切换模型时,
selectModel会检查当前会话中是否还有图片,以及目标模型是否支持图片输入。如果会话中有图片,而目标模型明确不支持,就会直接报错并拒绝切换。DSH 使用的底层依赖中已有图片降级函数
downgradeUnsupportedImages。当模型不支持图片时,它可以把历史消息中的图片替换成文字占位符。这个机制本来可以用来处理上述场景,但目前没有被用于模型切换:模型选择阶段的检查更早生效,直接阻止了切换。期望的效果与建议
有些任务必须借助图片才能说明清楚,这时可以先使用视觉模型;图片相关的问题处理完以后,如果后续不再需要图片,用户可能希望切换到性价比更高的纯文本模型,例如 DeepSeek V4 Flash。
建议允许用户切换到纯文本模型,可以复用现有的 downgradeUnsupportedImages 机制,也可以采用其他合适的处理方式。
至于是否需要用户确认,可以在交互上增加提示或确认框,明确告知用户:目标模型不支持图片,历史图片会被替换成文字占位符;确认后再完成切换。
运行环境
@deepseek-ai/dsh@0.1.0-rc.6截图
见附图。
感谢阅读,希望这个建议能对后续体验改进有所帮助。
English Version
Allow switching image-containing sessions to text-only models via the existing image downgrade capability
Hi DeepSeek Harness team, I noticed an issue while switching models and would like to share it here.
Description
When a session contains images in its message history, switching to a model that does not support image input is rejected.
Steps to reproduce
Send an image in a session.
After the image-related task is complete, try to switch to a model that does not support image input, such as DeepSeek V4 Flash.
The switch is rejected with the following error:
Model "deepseek-v4-flash" does not accept image input, but this session already contains images; select an image-capable model.Possible cause
After checking the relevant code, I found that
selectModelchecks whether the current session still contains images and whether the target model supports image input. If the session contains images and the target model explicitly does not support them, the switch is rejected immediately.The underlying dependency used by DSH already has an image downgrade function named
downgradeUnsupportedImages. When a model does not support images, this function can replace images in the message history with text placeholders. This existing mechanism could be used for the scenario above, but it is currently not applied during model switching: the earlier model-selection check blocks the switch first.Expected behavior and suggestion
Some tasks require a vision model because images are necessary to explain the problem. After the image-related part is complete, if images are no longer needed, users may want to switch to a more cost-effective text-only model, such as DeepSeek V4 Flash.
It would be helpful to allow users to switch to a text-only model, either by reusing the existing downgradeUnsupportedImages mechanism or through another suitable approach.
If confirmation is considered necessary, the UI could show a warning or confirmation dialog explaining that the target model does not support images and that historical images will be replaced with text placeholders before completing the switch.
Environment
@deepseek-ai/dsh@0.1.0-rc.6Screenshot
See the screenshot above.
Thank you for taking the time to review this feedback.
All reactions