diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index 8ea8641f39..efd4d9141f 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -2099,6 +2099,8 @@ return { role: message.role, + // Preserve output items so backend can reconstruct tool_calls/tool-role messages (temp chats) + ...(message.output ? { output: message.output } : {}), ...(message.role === 'user' && imageFiles.length > 0 ? { content: [