← Back to Pull requests

chore(anthropic): support anthropic 1.x and 2.x [SIGN-65] #21829

Closed
unknown closed this pull request without merging on Nov 17, 2026 18:22 UTC
View on GitHub
unknown unknown commented on Nov 16, 2026 20:58 UTC
Author

Description

Adds anthropic 1.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 httpx with the drop-in fork httpx2 and removed the temperature request 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 unbounded latest variant were test-side: calls passing temperature=, and import httpx for mock clients.

  • Test helper sampling_kwargs() sends temperature only on anthropic < 1 and expects the metadata accordingly; an httpx2-else-httpx alias supplies matching client classes.

  • Variants: 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.

  • Locks and supported_versions.json regenerated. Cassettes and snapshots are unchanged (requests match on path; vcrpy 9.4 supports httpx2).
  • 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 messages and streaming PRs.

    🤖 Generated with Claude Code

    Diff: 235 lines (+176 / -59) across 2 files Reviewer: wconti27 Review duration: 1283m
    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
    0.42
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.1% (MEDIUM) · Higher = larger blast radius
    42.1%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 16.7% · Safe to merge
    16.7%