chore(anthropic): support anthropic 1.x and 2.x [SIGN-65] #21829
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 235 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.327
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #21829"
general
weight: 0.35
wconti27
Description
Adds
anthropic1.x and 2.x to the tested matrix. Supersedes #21076 (the bot bump to 2.8.0). Makes the stopgap cap in #21818 (anthropic<1) unnecessary, so that PR can be closed.anthropic 1.0 replaced
httpxwith the drop-in forkhttpx2and removed thetemperaturerequest parameter. The integration's wrap targets (resources.messages.*, beta messages, streaming helpers) are unchanged in 1.x and 2.x, so no tracing or LLMObs code change was needed. The 29 failures on the unboundedlatestvariant were test-side: calls passingtemperature=, andimport httpxfor mock clients.sampling_kwargs()sendstemperatureonly on anthropic < 1 and expects the metadata accordingly; anhttpx2-else-httpxalias supplies matching client classes.anthropic~=0.28.0(minimum, kept),anthropic<1(latest 0.x),anthropic>=1,<2(Python 3.10 and 3.14 only, to stay under the CI job limit),anthropic (unpinned latest). anthropic >= 1 requires Python 3.10+; 2.x also runs on 3.14 and 3.15.supported_versions.jsonregenerated. Cassettes and snapshots are unchanged (requests match on path; vcrpy 9.4 supportshttpx2).Related: #20815 (LLMObs latest variants; the anthropic part is resolved here, mcp 2.x is not), #20816 (ASM variants, owned separately and already capped or adapted). Neither is closed.
Testing
tests/contrib/anthropic, all passing: anthropic 2.8.0 on Python 3.12, 3.14 and 3.15; 1.17.0 on 3.10; 0.28.1 (minimum) on 3.10; 0.125.0 on 3.9 and 3.13. anthropic 2.9.0 was not yet on the package mirror when the locks were generated, so locks resolve 2.8.0.Risks
None for runtime behavior (test, CI matrix and generated metadata only).
Additional Notes
Unrelated to the open
Bedrock beta messagesand streaming PRs.🤖 Generated with Claude Code