Skip to content

fix(openai-agents): Stop setting response model based on the request model - #7413

Closed
alexander-alderman-webb wants to merge 2 commits into
webb/isinstance-toolfrom
webb/openai-agents/remove-response-model-fallback
Closed

alexander-alderman-webb wants to merge 2 commits into
webb/isinstance-toolfrom
webb/openai-agents/remove-response-model-fallback

Conversation

@alexander-alderman-webb

@alexander-alderman-webb alexander-alderman-webb commented Sep 7, 2026 •

Copy link
Copy Markdown
Collaborator

Description

The response model doesn't necessarily equal the request model.

Issues

Reminders

@alexander-alderman-webb alexander-alderman-webb changed the title fix(openai-agents): Stop setting response model based on the request … fix(openai-agents): Stop setting response model based on the request model Sep 7, 2026
@github-actions

github-actions Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

Codecov Results 📊

✅ 130584 passed | ⏭️ 7122 skipped | Total: 137706 | Pass Rate: 94.83% | Execution Time: 460m 26s

📊 Comparison with Base Branch

Metric Change
Total Tests —
Passed Tests —
Failed Tests —
Skipped Tests —

✨ No test changes detected

All tests are passing successfully.

✅ Patch coverage is 100.00%. Project has 2504 uncovered lines.
✅ Project coverage is 90.26%. Comparing base (c16daa0) to head (5bb18fd).

Coverage diff
@@            Coverage Diff             @@
##        master       #PR       +/-##
==========================================
+ Coverage    90.25%    90.26%    +0.01%
==========================================
  Files          193       193         —
  Lines        25725     25720        -5
  Branches      9494      9490        -4
==========================================
+ Hits         23217     23216        -1
- Misses        2508      2504        -4
- Partials      1432      1432         —

Generated by Codecov Action

@alexander-alderman-webb
alexander-alderman-webb marked this pull request as ready for review September 7, 2026 12:12
@alexander-alderman-webb
alexander-alderman-webb requested a review from a team as a code owner September 7, 2026 12:12

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5bb18fd. Configure here.

if agent.model:
model_name = agent.model.model if hasattr(agent.model, "model") else agent.model
elif hasattr(agent, "_sentry_request_model"):
model_name = agent._sentry_request_model

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Request model lost for default models

Medium Severity

Removing _sentry_request_model drops the resolved request model when agent.model is unset. Agents that use the SDK default or a RunConfig model no longer get gen_ai.request.model, and chat spans are named chat None.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 5bb18fd. Configure here.

@alexander-alderman-webb

Copy link
Copy Markdown
Collaborator Author

Nevermind I've mixed stuff up

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