不支持的图片格式触发报错后,后续对话仍反复携带非法媒体,导致无法继续交互
Description
问题描述
MiMo Code 在处理图片时,只支持部分格式(bmp/gif/png/jpeg/webp)。当对话中引入不支持的图片格式(如 .ico)后:
- 触发 400 报错:
✗ Param Incorrect: invalid image format, only bmp/gif/png/jpeg/webp are supported - 后续每次发送内容都会自动重复携带该非法媒体引用
- 导致每轮对话都触发同样的报错,无法正常继续交互
触发场景
- 助手使用 Python/Pillow 生成了
.ico格式的图标文件 - 助手尝试用 Read 工具读取
.ico文件以在对话中展示 - 平台返回 400 错误:不支持的图片格式
- 此后每轮对话的上下文都自动携带该
.ico文件引用,持续触发相同报错
期望行为
- 触发格式不支持的报错后,后续对话不再自动携带该非法媒体内容
- 或在报错时清除该媒体的引用,避免循环报错
环境信息
- OS: Windows
- MiMo Code: latest
- 触发文件:
.ico格式图标(256x256,多尺寸嵌入)
Plugins
No response
OpenCode version
No response
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response
目前可使用压缩命令解决
Agent repeatedly carrying invalid media in every subsequent message is a stuck loop — the error state never gets cleared from context so it keeps retrying with the same bad input.
AgentAutopsy's Loop Detector + Context Monitor catches exactly this — flags repeated identical errors and shows the invalid payload bloating the context.
github.com/Abhisekhpatel/AgentAutopsy
这个问题不只是 MiMoCode,多个使用小米 MiMo API 的软件都出现了同样的错误:ERROR: Cannot read clipboard (this model does not support image input)。
说明这是 API 服务端的问题,不是客户端 bug。错误信息中的 clipboard 是 API 的通用错误模板,跟实际是否粘贴图片无关。
复现环境:
- OS: Windows 10/11
- 多个不同客户端软件均复现
- 模型: mimo-v2.5-pro(实际支持图片输入,但 API 偶发性拒绝)
建议 API 团队排查图片请求的错误处理逻辑。