Skip to content

fix(anthropic): Gate gen_ai.response.tool_calls on outputs, not inputs - #7207

Open
ericapisani wants to merge 1 commit into
py-2734-update-tool-attr-openaifrom
py-2734-update-tool-anthropic
Open

fix(anthropic): Gate gen_ai.response.tool_calls on outputs, not inputs#7207
ericapisani wants to merge 1 commit into
py-2734-update-tool-attr-openaifrom
py-2734-update-tool-anthropic

Conversation

@ericapisani

Copy link
Copy Markdown
Member

Tool call data is part of the model's response, so it should be recorded when data_collection.gen_ai.outputs is enabled, not gated on inputs.

We're setting the value to a legacy attribute, but transitioning to the non-legacy attributes should be done separately so we can update all the integrations at around the same time.

Refs PY-2734
Refs #7200

Tool call data is part of the model's response, so it should be
recorded when `data_collection.gen_ai.outputs` is enabled, not gated
on `inputs`.

We're setting the value to a legacy attribute, but transitioning to the
non-legacy attributes should be done separately so we can update all the
integrations at around the same time.

Refs PY-2734
Refs #7200
@ericapisani
ericapisani requested a review from a team as a code owner August 14, 2026 15:33
@linear-code

linear-code Bot commented Aug 14, 2026

Copy link
Copy Markdown

PY-2734

@github-actions

Copy link
Copy Markdown
Contributor

Codecov Results 📊

113083 passed | ⏭️ 6697 skipped | Total: 119780 | Pass Rate: 94.41% | Execution Time: 412m 17s

📊 Comparison with Base Branch

Metric Change
Total Tests 📉 -143
Passed Tests 📉 -74
Failed Tests 📉 -1
Skipped Tests 📉 -68

➖ Removed Tests (1)

View removed tests
  • test_span_streaming_quart_auth_user_id[42-True]
    • File: tests.integrations.quart.test_quart

All tests are passing successfully.

✅ Patch coverage is 100.00%. Project has 2483 uncovered lines.
✅ Project coverage is 90.23%. Comparing base (base) to head (head).

Files with missing lines (1)
File Patch % Lines
sentry_sdk/integrations/anthropic.py 100.00% ⚠️ 1 partials
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    90.20%    90.23%    +0.03%
==========================================
  Files          193       193         —
  Lines        25423     25418        -5
  Branches      9336      9336         —
==========================================
+ Hits         22933     22935        +2
- Misses        2490      2483        -7
- Partials      1436      1438        +2

Generated by Codecov Action

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.

1 participant