mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #113] [MERGED] serve: keep image parts in tool/assistant messages #2465
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#2465
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/113
Author: @Yunado
Created: 9/29/2026
Status: ✅ Merged
Merged: 9/29/2026
Merged by: @Niko1221
Base:
main← Head:fix/serve-tool-images📝 Commits (1)
cb91f2aserve: keep image parts in tool/assistant messages📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
serve/frontend.py(+1 -1)📄 Description
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_contentis applied to user/assistant/tool alike), andimages_ofcounts them from the same normalized messages, so only this conversion was too strict._parts_ofpasses plain string content through unchanged, so text-only traffic is untouched.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.