Skip to content

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

@KKJava1

Description

@KKJava1

When using DashScopeChatModel with qwen3.5-plus in thinking mode, reasoning output is not always emitted as
ReasoningChunkEvent.

In my case, the model does return reasoning content, but sometimes it is only present inside the incremental Msg carried by
SummaryChunkEvent as ThinkingBlock, while no separate ReasoningChunkEvent is fired.

This causes an integration problem for streaming UIs and hooks that follow the current event contract literally:

  • ReasoningChunkEvent -> render reasoning/thinking
  • SummaryChunkEvent -> render final answer text

With qwen3.5-plus, this assumption can fail, because reasoning may be mixed into SummaryChunkEvent. As a result, the
frontend may appear to receive no reasoning at all unless it additionally parses ThinkingBlock from SummaryChunkEvent.

Environment:

  • AgentScope Java: 1.0.10
  • DashScope SDK: 2.0.0
  • Model: qwen3.5-plus
  • Streaming: true
  • Thinking: true
  • Additional body params:
    • result_format=message
    • incremental_output=true

Simplified setup:

DashScopeChatModel chatModel = DashScopeChatModel.builder()
.apiKey(apiKey)
.baseUrl("https://dashscope.aliyuncs.com/compatible-mode/v1")
.modelName("qwen3.5-plus")
.stream(true)
.enableThinking(true)
.defaultOptions(GenerateOptions.builder()
.additionalBodyParam("result_format", "message")
.additionalBodyParam("incremental_output", true)
.build())
.build();

Observed behavior:

  • Some reasoning text is only available from:
    • SummaryChunkEvent#getIncrementalChunk()
    • Msg#getContentBlocks(ThinkingBlock.class)
  • No corresponding ReasoningChunkEvent is emitted for that same reasoning delta

Expected behavior:

  • If an incremental chunk contains ThinkingBlock, AgentScope should emit a ReasoningChunkEvent for it
  • Or, if this is intentional, the documentation should explicitly state that reasoning may arrive via SummaryChunkEvent and
    consumers must inspect ThinkingBlock manually

Why this looks like a bug:

  • Other model/provider paths are easier to consume because reasoning arrives as ReasoningChunkEvent
  • For qwen3.5-plus, downstream consumers need model-specific workaround logic
  • This breaks the abstraction promised by hook event types

Current workaround on my side:

  • Continue handling ReasoningChunkEvent
  • Also inspect SummaryChunkEvent#getIncrementalChunk() and manually split:
    • ThinkingBlock -> reasoning stream
    • TextBlock -> normal text stream

It would be great if AgentScope could unify this behavior at the framework level.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions