Streamed response is not fully logged

Created on 9 July 2025, 3 days ago

Problem/Motivation

When using the CKEditor module all the plugins work in Streamed mode. As a result logs do not have the output text and no usage can be tracked as well.

Steps to reproduce (required for bugs, but not feature requests)

Please provide information like AI modules enabled, which AI provider, browser, etc.

  1. Use OpenAI provider.
  2. Enable AI logging module.
  3. Enable AI CKEditor module.
  4. Perform some operation with AI CKEditor assistant.
  5. Check AI logs, no output text is logged. It is always empty json object.

Proposed resolution

Collect the message from chunks and add it to output of PostStreamingResponseEvent that is triggered from StreamedChatMessageIterator. This iterator has method triggerEvent that is not used anywhere at the moment. I suggest to pass message text, role and usage to that method and call it in the StreamResponse callback.

Remaining tasks

Review MR.

Optional: Other details as applicable (e.g., User interface changes, API changes, Data model changes)

Method triggerEvent from StreamedChatMessageIterator class will have 3 new optional parameters.

Feature request
Status

Active

Version

1.2

Component

AI Logging

Created by

🇩🇪Germany a.dmitriiev

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024