Skip to content

fix(core): mirror summary thinking into reasoning events#1169

Open
Alexxigang wants to merge 1 commit intoagentscope-ai:mainfrom
Alexxigang:fix/summary-thinking-reasoning-events
Open

fix(core): mirror summary thinking into reasoning events#1169
Alexxigang wants to merge 1 commit intoagentscope-ai:mainfrom
Alexxigang:fix/summary-thinking-reasoning-events

Conversation

@Alexxigang
Copy link
Copy Markdown
Contributor

Summary

  • mirror summary-phase ThinkingBlock chunks into ReasoningChunkEvent
  • keep the existing SummaryChunkEvent behavior for summary streaming intact
  • add regression tests for summary thinking delivery, accumulated reasoning content, and hook event order

Why this fix

ReActAgent uses a dedicated summary streaming path after max-iteration fallback. In that path, a streamed ThinkingBlock currently only triggers SummaryChunkEvent, even though the same provider/model behavior is exposed as ReasoningChunkEvent in normal reasoning streams.

That breaks the hook abstraction for clients that render reasoning exclusively from ReasoningChunkEvent, especially with models like qwen3.5-plus that may place thinking deltas inside the summary stream.

This patch keeps summary hooks working as before, while also mirroring summary-phase thinking chunks into ReasoningChunkEvent with accumulated thinking content.

Fixes #1152.

Validation

  • mvn -pl :agentscope-core -am spotless:apply
  • mvn -pl :agentscope-core -am "-Dtest=ReActAgentSummaryThinkingHookTest" test
  • mvn -pl :agentscope-core -am "-Dtest=ReActAgentTest,ReActAgentThinkingCumulativeTest,ReActAgentSummaryThinkingHookTest" test

@Alexxigang
Copy link
Copy Markdown
Contributor Author

Rebased this PR onto the current main and refreshed the head branch so it can be re-evaluated without the previous merge-conflict state.

@Alexxigang Alexxigang force-pushed the fix/summary-thinking-reasoning-events branch from 34b83be to c30e8b9 Compare April 9, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DashScopeChatModel: Qwen3.5-plus thinking chunks may be emitted only via SummaryChunkEvent instead of ReasoningChunkEvent

1 participant