Pull requests / #113

#113 serve: keep image parts in tool/assistant messages

closed · merged 2026-09-29 · @Yunado · 0 comentários · No GitHub

Server & API

Descrição

`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.

No site

Links install, modelos, releases.