Skip to content

Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.

C++

serve: keep image parts in tool/assistant messages

Yunado8989030db5da
diff --git a/serve/frontend.py b/serve/frontend.py
index afe014089..d50ccbfc3 100644
--- a/serve/frontend.py
+++ b/serve/frontend.py
@@ -144,7 +144,7 @@ def openai_to_messages(req: dict) -> tuple[list[dict], list[dict] | None, dict]:
role = m.get("role")
if role == "developer":
role = "system"
- out = {"role": role, "content": _parts_of(m.get("content")) if role == "user" else _text_of(m.get("content"))}
+ out = {"role": role, "content": _parts_of(m.get("content")) if role in ("user", "tool", "assistant") else _text_of(m.get("content"))}
if m.get("reasoning_content"):
out["reasoning_content"] = m["reasoning_content"]
if m.get("tool_calls"):