Pull requests / #113
#113 serve: keep image parts in tool/assistant messages
closed · merged 2026-09-29 · @Yunado · 0 评论 · 在 GitHub 查看
描述
`openai_to_messages()` flattened every non-user message to text, so agent clients that return screenshots as tool results (CUA-style loops) run blind: the model never sees the image. The chat template renders image items in any non-system message fine (`render_content` is applied to user/assistant/tool alike), and `images_of` counts them from the same normalized messages, so only this conversion was too strict. `_parts_of` passes plain string content through unchanged, so text-only traffic is untouched.
站内延伸阅读
链到安装、模型与版本说明,便于 SEO/GEO,非官方 issue 正文。