Skip to content

feat(anthropic): support extended thinking round trips#2233

Open
dailingtao wants to merge 4 commits into
agentscope-ai:mainfrom
dailingtao:codex/issue-2219-anthropic-thinking
Open

feat(anthropic): support extended thinking round trips#2233
dailingtao wants to merge 4 commits into
agentscope-ai:mainfrom
dailingtao:codex/issue-2219-anthropic-thinking

Conversation

@dailingtao

@dailingtao dailingtao commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #2219.

  • map GenerateOptions.thinkingBudget to Anthropic budget_tokens
  • preserve Anthropic thinking signatures and redacted thinking blocks in ThinkingBlock metadata
  • restore those native blocks, in their original order, when conversation history is sent back to Anthropic
  • preserve provider metadata while streaming thinking chunks are accumulated by ReasoningContext
  • keep the existing text fallback for unsigned ThinkingBlocks from other providers
  • document Anthropic extended-thinking configuration in English and Chinese

Validation

  • mvn -pl agentscope-extensions/agentscope-extensions-model/agentscope-extensions-model-anthropic -am clean verify
  • AgentScope Core: 2214 tests, 0 failures, 0 errors, 9 skipped
  • Anthropic model extension: 150 tests, 0 failures, 0 errors, 1 skipped
  • local JaCoCo estimate for added executable lines: 129/134 (96.3%)

@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

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.

[Feature]: Anthropic 推理增强

1 participant