Repository navigation
openai_agents: support openai-agents 0.23 and 0.24 - #422
Merged
Merged
Conversation
Widen the openai-agents range from >=0.22,<0.23 to >=0.22,<0.25 and lock 0.24.0. The lock also moves pyjwt to 2.15.1, the floor that openai-agents 0.23 sets. No plugin code changes. Two tests pinned text that only openai-agents 0.22 gives: - From 0.23 the SDK's default_tool_error_function returns a fixed message without error details, so the argument error tests check only that prefix. The parity test with a stock function_tool still checks the full text. - From 0.24 function_schema reads an Args:-only docstring as parameter descriptions, so two callable-class rows expect what the SDK reads. Lint and tests pass with 0.22.0 to 0.22.3, 0.23.1 and 0.24.0. Fixes #416
campoy
marked this pull request as ready for review
November 4, 2026 16:56
campoy
marked this pull request as draft
November 4, 2026 16:59
campoy
marked this pull request as ready for review
November 5, 2026 00:18
JasonSteving99
approved these changes
Nov 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was changed
Can you use the plugin with openai-agents 0.23 or 0.24? Not today: we pin
>=0.22,<0.23. This PR widens that to>=0.22,<0.25. No plugin code changes, just the range, the lock, and two tests that pinned 0.22's wording.openai-agentsrange goes from>=0.22,<0.23to>=0.22,<0.25, in the dependencies and the dev group.uv.locknow has openai-agents 0.24.0, and pyjwt 2.15.1, the floor openai-agents 0.23 sets.The review rounds added approval fixes that set private Agents SDK state on the plugin's copies of each agent. 2def4f6 reverts them, so this PR is the range change only. #426 fixes approvals another way (more below).
Why?
Anyone on openai-agents 0.23 or 0.24, because they can't install the plugin today. OpenAI's own Temporal sandbox sample is one of them:
examples/sandbox/extensions/temporalin openai/openai-agents-python is on 0.24.0, so it's stuck on temporalio 1.34.What do 0.23 and 0.24 change for us?
Not much. The private SDK code the plugin uses is unchanged in 0.23.1 and 0.24.0:
agents.models._openai_shared,Handoff._agent_ref,FunctionTool._agent_instance,RunResultStreaming._stored_exception, the MCP approval internals, theMultiProvidercaches, and theasyncio.to_threadcalls inagents.tool. The newBaseSandboxSessionmethods have defaults built onexec,readandwrite, which the plugin already runs in activities.Two upstream changes do reach users through the plugin, the same way they reach a stock
function_tool:default_tool_error_functionreturns a fixed message without error details (fix(tools): redact default tool failure details openai/openai-agents-python#5112).activity_as_toolandnexus_operation_as_tooluse it by default, so for bad arguments the model now gets "An error occurred while running the tool. Please try again." The end-to-end cases intest_openai_tool_argument_errors.pynow check only that prefix.test_argument_error_text_matches_function_toolstill checks that the text matches a stockfunction_tool.function_schemareads a docstring with only anArgs:section as parameter descriptions, not as text (fix: Preserve parameter descriptions in Args-only docstrings openai/openai-agents-python#5302). Two rows oftest_callable_class_tool_summary_from_class_docstringnow expect the parameter description the SDK reads. The tool description is the same on every version.Neither needs a version check, so the range keeps 0.22.
Known limit: permanent approvals on 0.23 and 0.24
From 0.23, the SDK ties a tool approval to the agent object that owns the tool (openai/openai-agents-python#5144). The plugin runs a new copy of your agent on every run. So on 0.23 and 0.24, an approval given with
always_approve=Truedoesn't carry over to a later run with the same agent and context: that run asks again. Resuming the paused run works as before.#426 fixes this by running your agents without copies. Let's release the two together.
Is it Breaking?
No. The plugin's API and behavior don't change, and installs on 0.22 keep working.
Checklist
Fixes [Feature Request] openai_agents: support openai-agents 0.23 and 0.24 #416
How was this tested:
make sync,make lintandmake test(Python 3.13) pass with openai-agents 0.22.0, 0.22.1, 0.22.2, 0.22.3, 0.23.1 and 0.24.0, each locked in a scratch copy (0.23.0 was never on PyPI). The recorded histories intest_openai_replay.pyreplay on all of them.make build,check_wheel.pyandcheck_conventions.pypass with the lock. CI runs the locked 0.24.0.