Skip to content

fix(anthropic): Stop unpacking output arrays - #8160

Open
alexander-alderman-webb wants to merge 1 commit into
masterfrom
webb/anthropic/unpack-false
Open

alexander-alderman-webb wants to merge 1 commit into
masterfrom
webb/anthropic/unpack-false

Conversation

@alexander-alderman-webb

@alexander-alderman-webb alexander-alderman-webb commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

The specific problem this fixes is text output that is JSON, as returned from

response = client.messages.create(
    model="claude-opus-5-5",
    max_tokens=16000,
    output_config={"format": {
        "type": "json_schema",
        "schema": {
            "type": "object",
            "properties": {"summary": {"type": "string"}},
            "required": ["summary"],
            "additionalProperties": False,
        },
    }},
    messages=[{"role": "user", "content": "Summarize Bill 119."}],
)

Closes AGT-3211

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Coverage Results 📊

✅ 136856 passed | ⏭️ 7456 skipped | Total: 144312 | Pass Rate: 94.83% | Execution Time: 450m 14s

All tests are passing successfully.

✅ Patch coverage is 100.00% (no changed executable lines found; target 80%).
Project statement coverage is 90.31% (down 0.01 percentage points from base (7ad4e1a) to head (00fafcc)).

Files with missing lines (1)
File Coverage % Lines
sentry_sdk/integrations/anthropic.py 89.63% ⚠️ 51 Missing and 42 partials
Coverage diff
@@            Coverage Diff             @@
##        master     #8160       +/-##
==========================================
- Coverage    90.32%    90.31%    -0.01%
==========================================
  Files          203       203         —
  Tracked lines     26872     26872         —
  Branches     10044     10044         —
==========================================
- Hits         24272     24268        -4
- Misses        2600      2604        +4
+ Partials      1520      1517        -3

Generated by Coverage Action

@alexander-alderman-webb
alexander-alderman-webb marked this pull request as ready for review October 29, 2026 12:55
@alexander-alderman-webb
alexander-alderman-webb requested a review from a team as a code owner October 29, 2026 12:55
@linear-code

linear-code Bot commented Oct 29, 2026

Copy link
Copy Markdown

AGT-3211

This branch has not been deployed

No deployments
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.

3 participants