feat: update reasoning for claude opus 4.7#2089
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2089 +/- ##
==========================================
+ Coverage 84.42% 84.44% +0.02%
==========================================
Files 134 134
Lines 19162 19175 +13
==========================================
+ Hits 16177 16193 +16
+ Misses 1998 1995 -3
Partials 987 987 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Related Documentation 1 document(s) may need updating based on files changed in this PR: Envoy's Space vendor-specific-fields
|
5f6e1ec to
46c30b0
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates the Anthropic SDK to version 1.38.0 and adds a Display field to thinking configurations in Anthropic, OpenAI, and AWS Bedrock schemas. It also introduces a local ReasoningEffort type alias and constants to decouple the implementation from the OpenAI SDK, while extending support for new Anthropic models like opus-4-7 and mythos-preview. Review feedback identifies discrepancies in docstrings regarding the none reasoning effort value and suggests using the local type alias consistently in struct definitions to complete the decoupling.
Signed-off-by: yxia216 <yxia216@bloomberg.net>
Signed-off-by: yxia216 <yxia216@bloomberg.net>
7a8b82e to
c9d1abe
Compare
|
/retest |
|
@nacx Hi, I have rebased and fixed the conflicts. Could you please help to merge this pr? Thanks a lot! |
Description
1 Previously, the
displayfield defaulted tosummarizedand was dropped during translation. However, on Claude Opus 4.7 and Claude Mythos Preview, display defaults toomittedinstead, so users must setdisplay: "summarized"explicitly to receive summarized thinking [1]. This PR exposes thedisplayparameter so users can control thinking content visibility.2 Add
opus-4-7andmythos-previewto the list of effort-supported models. Also, with Claude Opus 4.7, Anthropic introducedxhighas a separate effort tier betweenhighandmaxfor long-horizon agentic and coding tasks [2]; Upgradeanthropic-sdk-gofrom v1.27.1 to v1.38.0 forOutputConfigEffortXhighconstant support; Define self-ownedReasoningEffortconstants (none,low,medium,high,xhigh,max) in the internal OpenAI schema package, replacing direct usage ofopenaisdk.ReasoningEffort*constants across Anthropic and Gemini translators. This decouples the gateway from the upstream OpenAI SDK's constant definitions and allows extending with values likemaxthat are Anthropic-specific.3 Add
OfAdaptivebranch to AWS Bedrock thinking map (previously missing).4 4
outputConfigModels(structured outputs) is not updated for the new models as it is not available on AWS Bedrock for both Converse API and InvokeModel API.1: https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking#summarized-thinking
2: https://platform.claude.com/docs/en/build-with-claude/effort#effort-levels