fix(api): don't re-persist user turn on empty-response retry (#4079)

The non-streaming retry called process_direct again with the same
content, persisting a duplicate user turn. Pass persist_user_message=False
so the retry recovers a response without re-recording the user message.
This commit is contained in:
04cb authored and Xubin Ren committed 2026-06-16 21:31:26 +08:00
1 parent 25a55fe1c7
commit d75f80437c
4 files changed
+35 -1

No files matched your search

+1
View File
@@ -340,6 +340,7 @@ async def handle_chat_completions(request: web.Request) -> web.Response:
session_key=session_key,
channel="api",
chat_id=API_CHAT_ID,
persist_user_message=False,
),
timeout=timeout_s,
)