feat(anthropic): support extended thinking round trips - #2233
feat(anthropic): support extended thinking round trips#2233dailingtao wants to merge 10 commits into
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
AgentScopeJavaBot
left a comment
There was a problem hiding this comment.
🤖 AI Review
| Aspect | Count |
|---|---|
| 🟢 Nitpick (信息性建议,不阻塞合并) | 3 |
| 🟡 Recommended (建议修复,但不阻塞合并) | 2 |
Overall Assessment: COMMENT — Well-designed extended thinking round-trip support; two defensive-programming improvements recommended before merge.
AgentScopeJavaBot
left a comment
There was a problem hiding this comment.
🤖 AI Review
| Aspect | Count |
|---|---|
| 🟢 Nitpick (信息性建议,不阻塞合并) | 3 |
| 🟡 Recommended (建议修复,但不阻塞合并) | 2 |
Overall Assessment: COMMENT — Well-designed extended thinking round-trip support; two defensive-programming improvements recommended before merge.
|
Hi @jujn, it looks like AgentScopeJavaBot may be stuck on this PR. The bot submitted the same review summary twice for commit The latest head is now Could you please help re-trigger the AI review or check whether the bot All current CI checks are passing. Thanks! |
|
Thanks for your contribution. I'll review it later when I have time. |
|
为什么关闭了?因为PR比较大,之前一直抽不出完整的时间去审。预计 2.0.4 会合入 |
好的 thanks ,以为不合入了 看到dingding群里的一个哥们说 可以抽空把自己没合入的PR 清一下 减小review的压力 |
…ropic-thinking # Conflicts: # agentscope-extensions/agentscope-extensions-model/agentscope-extensions-model-anthropic/src/main/java/io/agentscope/extensions/model/anthropic/formatter/AnthropicResponseParser.java # agentscope-extensions/agentscope-extensions-model/agentscope-extensions-model-anthropic/src/test/java/io/agentscope/extensions/model/anthropic/formatter/AnthropicResponseParserTest.java
AgentScope-Java Version
2.0.3-SNAPSHOT
Description
Fixes #2219.
This PR adds Anthropic extended-thinking round-trip support while preserving Anthropic-native signed content across streaming, multi-turn, and tool-use flows.
GenerateOptions.thinkingBudgetto Anthropic manual thinking (type: enabledwithbudget_tokens)additionalBodyParams; per-call configuration overrides defaults, while conflicting manual/adaptive configurations fail locallyThinkingBlockmetadata and restore them in their original order when conversation history is sent back to AnthropicReasoningContextmainprompt-caching token accounting when merging streaming parser stateValidation
mvn -pl agentscope-extensions/agentscope-extensions-model/agentscope-extensions-model-anthropic -am -Dtest=AnthropicResponseParserTest,AnthropicMessageConverterTest,AnthropicToolsHelperTest,AnthropicChatModelThinkingRoundTripTest -Dsurefire.failIfNoSpecifiedTests=false testmvn -pl agentscope-extensions/agentscope-extensions-model/agentscope-extensions-model-anthropic -am clean verifygit diff --checkChecklist
clean verify