Skip to content

fix(model): anthorpic stream thinking event#1943

Open
rudy2steiner wants to merge 1 commit into
agentscope-ai:mainfrom
rudy2steiner:anthropic_thinking_response_parse
Open

fix(model): anthorpic stream thinking event#1943
rudy2steiner wants to merge 1 commit into
agentscope-ai:mainfrom
rudy2steiner:anthropic_thinking_response_parse

Conversation

@rudy2steiner

Copy link
Copy Markdown

Summary
Fixes #1636 by parsing Anthropic streaming thinking_delta events into AgentScope ThinkingBlock content blocks. Non-streaming thinking blocks were already supported; this adds
parity for streamed responses.

Changes

  • Added delta().thinking() handling in AnthropicResponseParser.parseStreamEvent(...).
  • Converts Anthropic ThinkingDelta content into io.agentscope.core.message.ThinkingBlock.
  • Added regression coverage for streaming thinking deltas using RawContentBlockDeltaEvent.builder().thinkingDelta(...).

@rudy2steiner rudy2steiner requested a review from a team June 26, 2026 14:47
@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

AnthropicResponseParser stream doesn't support thinkingblocks 为什么流式方式调用不支持提取 thinking 内容

1 participant