Skip to content

Conversation

@alexander-alderman-webb
Copy link
Contributor

@alexander-alderman-webbalexander-alderman-webb commented Nov 20, 2025

Description

Remove the function property from tool calls in mocked model responses.

The commit openai/openai-agents-python@a776d80 broke our test suite because instances of ResponseFunctionToolCall are now serialized inside openai-agents. As we attach a non-serializable MagicMock to the instances, our test suite faces an unhandled exception starting with openai-agents version 0.6.0.

The model ResponseFunctionToolCall does not declare a function field: openai/openai-python@main/src/openai/types/responses/response_function_tool_call.py

Issues

Closes#5124

Reminders

@alexander-alderman-webbalexander-alderman-webb changed the title test(dramatiq): Expect exceptions when re-raisedtest(openai-agents): Remove MagicMock from ModelResponseNov 20, 2025
@codecov
Copy link

codecovbot commented Nov 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.98%. Comparing base (c63e8d8) to head (0d6e72b).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@ Coverage Diff @@## master #5126 +/- ## ========================================== - Coverage 84.01% 83.98% -0.03%  ========================================== Files 180 180 Lines 18168 18168 Branches 3227 3227 ========================================== - Hits 15263 15259 -4 - Misses 1916 1921 +5 + Partials 989 988 -1 

see 2 files with indirect coverage changes

@alexander-alderman-webbalexander-alderman-webb marked this pull request as ready for review November 20, 2025 10:55
Base automatically changed from webb/test-dramatiq to masterNovember 20, 2025 13:51
@alexander-alderman-webbalexander-alderman-webb merged commit 0e6e808 into masterNov 20, 2025
141 of 143 checks passed
@alexander-alderman-webbalexander-alderman-webb deleted the webb/test-openai-agents branch November 20, 2025 14:16
Sign up for freeto 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.

Support openai-agents 0.6.x

3 participants

@alexander-alderman-webb@sl0thentr0py