Skip to content

fix(integrations): openai-agents fix multi-patching of get_model function#5195

Merged
constantinius merged 2 commits into
masterfrom
constantinius/fix/integrations/openai-agents-multipatching
Dec 9, 2025
Merged

fix(integrations): openai-agents fix multi-patching of get_model function#5195
constantinius merged 2 commits into
masterfrom
constantinius/fix/integrations/openai-agents-multipatching

Conversation

@constantinius

Copy link
Copy Markdown
Contributor

Description

When passing in an explicit model instance instead of a string the model was patched multiple times event if it was already patched before. This PR prohibits that.

Issues

Contributes to: https://linear.app/getsentry/issue/TET-1511/openai-agents-double-span-reporting

@constantinius constantinius requested a review from a team as a code owner December 3, 2025 17:06
@linear

linear Bot commented Dec 3, 2025

Copy link
Copy Markdown

Comment thread sentry_sdk/integrations/openai_agents/patches/models.py Outdated
@codecov

codecov Bot commented Dec 3, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.27%. Comparing base (05e1bff) to head (4dbf22a).
⚠️ Report is 6 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5195      +/-   ##
==========================================
+ Coverage   84.24%   84.27%   +0.03%     
==========================================
  Files         181      181              
  Lines       18441    18442       +1     
  Branches     3283     3283              
==========================================
+ Hits        15535    15542       +7     
+ Misses       1892     1889       -3     
+ Partials     1014     1011       -3     
Files with missing lines Coverage Δ
...y_sdk/integrations/openai_agents/patches/models.py 87.17% <100.00%> (+0.33%) ⬆️

... and 4 files with indirect coverage changes

@constantinius constantinius merged commit 3eac23c into master Dec 9, 2025
155 checks passed
@constantinius constantinius deleted the constantinius/fix/integrations/openai-agents-multipatching branch December 9, 2025 11:48
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.

2 participants