Skip to content

[Feature]: AguiMessageConverter::toAguiMessage 为什么没有转化reasoning message #2859

Closed

Description

@joman-jiang

期望在转化为Agui Message时,能包含该 reasoning message

Activity

  1. added
    enhancement
    on Aug 27, 2026
  2. hexly666 commented on Aug 28, 2026

    @hexly666
    Contributor

    增加配置:agentscope.agui.enable-reasoning=true 的配置可以打开

  3. joman-jiang commented on Aug 31, 2026

    @joman-jiang
    Author

    增加配置:agentscope.agui.enable-reasoning=true 的配置可以打开

    是的,这个配置可以开启AguiEvent.ReasoningMessage*事件的转化,但不是AguiMessage

  4. added
    good first issue
    on Aug 31, 2026
  5. CryoThrust commented on Aug 31, 2026

    @CryoThrust
    Contributor

    I would like to work on this. I plan to add reasoning-message conversion in AguiMessageConverter with focused regression coverage, keeping the existing AguiEvent reasoning behavior backward compatible. I will first verify the current converter model and test contract before opening a PR.

  6. CryoThrust commented on Aug 31, 2026

    @CryoThrust
    Contributor

    I have confirmed the current AG-UI model has no dedicated reasoning field on AguiMessage, while reasoning is represented by streaming ReasoningMessage events. Before implementing a new wire field or folding reasoning into text content, could maintainers confirm the expected AG-UI message shape for non-streaming conversion? I can then add the compatible converter and regression test.

  7. dragondyt commented on Sep 2, 2026

    @dragondyt
    Contributor

    我已经确认当前的 AG-UI 模型在 AguiMessage 上没有专门的推理字段,推理过程是通过流式 ReasoningMessage 事件来表示的。在实现新的线字段或将推理内容折叠到文本内容之前,维护人员能否确认一下非流式转换的预期 AG-UI 消息格式?这样我就可以添加兼容的转换器并进行回归测试。

    https://docs.ag-ui.com/concepts/messages#reasoning-messages

  8. dragondyt commented on Sep 2, 2026

    @dragondyt
    Contributor

    role: "reasoning"

    Image
  9. oss-maintainer commented on Sep 14, 2026

    @oss-maintainer
    Collaborator

    Issue Evaluation
    Category: enhancement | Area: area/ext/integration | Status: Evaluated

    Feasibility: Feasible. The streaming adapter already converts ThinkingBlock to AG-UI reasoning events via ThinkingBlockEventConverter (lines 24-53). The gap is confined to the batch converter: AguiMessageConverter.toAguiMessage() at lines 136-156 iterates content blocks but has no branch for ThinkingBlock, and AguiMessage has no reasoning field to carry it.

    Scope: Two files require changes: AguiMessage (add a reasoning content field or reasoning-aware content type per the AG-UI spec's role: "reasoning" message shape) and AguiMessageConverter.toAguiMessage() (map ThinkingBlock.thinking into the new field). Community comments reference the AG-UI reasoning messages spec as the target shape.

    Compatibility: Additive field on AguiMessage (nullable, backwards-compatible). Existing consumers that ignore unknown fields will not break.

    Verified on current main: confirmed ThinkingBlock is absent from the batch conversion path while present in the streaming path.

    Automated evaluation by github-manager-bot

  10. added
    area/ext/integration
    on Sep 14, 2026
  11. xuchaoguo1983 commented on Oct 1, 2026

    @xuchaoguo1983

    The same method has a second gap besides reasoning: AguiMessageConverter.toAguiMessage(Msg) drops non-text content. A user Msg with [TextBlock("look"), ImageBlock(base64 png)] converts to AguiMessage{content=Text[value=look]}, and a message with only an ImageBlock converts to content=null, although toMsg accepts image/audio/video/document InputContent, so the two directions are asymmetric. Verified on 2.0.4-SNAPSHOT.

  12. added a commit that references this issue on Oct 11, 2026
    16632ae
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/ext/integrationenhancementgood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions