fix(im): preserve cancellation during image fallback

This commit is contained in:
xmanrui 2026-09-02 01:35:48 +08:00
parent c7679d86a1
commit 9d2e9c800b
5 changed files with 41 additions and 10 deletions

View file

@ -10,6 +10,12 @@ This file records the notable changes in each dsh-im release. Its format follows
- 非视觉模型收到图片时不再直接报错丢图:宿主以 `MODEL_DOES_NOT_SUPPORT_IMAGES` 拒绝带图片的 prompt 后,自动把同一批图片字节按入站文件管线落盘到 Session 工作区,并以"原文本 + 工具分析指引 + `<dsh_im_files>` 清单"的纯文本 prompt 复用同一 rpcId 重试一次,使非视觉模型仍可通过 run_code/pwsh 等工具识图;视觉模型与文件消息行为不变,其余图片错误仍按原样提示。
Sending an image to a non-vision model no longer fails outright: when the Host rejects an image-bearing prompt with `MODEL_DOES_NOT_SUPPORT_IMAGES`, the same image bytes are automatically staged into the Session workspace through the inbound-file pipeline and retried once as a text-only prompt (original text plus tool-analysis guidance and the `<dsh_im_files>` manifest) under the same rpcId, so non-vision models can still inspect images via tools such as run_code/pwsh. Vision models and file messages are unchanged, and other image errors keep their existing messages.
### Fixed / 修复
- 非视觉模型图片回退在文件落盘阶段收到取消信号时,现在会保留调用方的取消原因并停止处理,不再误报模型不支持图片。
When image fallback for a non-vision model is cancelled while staging files, it now preserves the caller's cancellation reason and stops instead of reporting that the model does not support images.
## [4.5.0] - 2026-09-01
### Added / 新增