AI-249: Support CustomTool in OpenAI Agents plugin tool dispatch#1570
Open
xumaple wants to merge 4 commits into
Open
AI-249: Support CustomTool in OpenAI Agents plugin tool dispatch#1570xumaple wants to merge 4 commits into
xumaple wants to merge 4 commits into
Conversation
Fixes #1561. Adds a CustomToolInput dataclass and CustomTool dispatch branch (mirroring the existing HostedMCPTool precedent), so Workflows exposing any CustomTool subclass — notably SandboxApplyPatchTool, which the default Filesystem capability registers on every SandboxAgent — no longer fail with `ValueError: Unsupported tool type: apply_patch` at Activity input construction. Also round-trips `defer_loading` through `tool_config`, so direct `CustomTool(defer_loading=True)` callers continue to work with `ToolSearchTool()` lazy tool discovery. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
basedpyright in CI flagged the inline async stub callable for missing type annotations and unused-parameter warnings. Adds Any/str annotations and underscore-prefixes the params. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
a56c783 to
bbbf3fd
Compare
JasonSteving99
approved these changes
Jun 1, 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.
Summary
CustomToolInputdataclass andCustomTooldispatch branch (mirroring the existingHostedMCPToolprecedent), unblocking Workflows whose Agent exposes anyCustomToolsubclass — notablySandboxApplyPatchTool, which the defaultFilesystemcapability registers on everySandboxAgent.defer_loadingthroughtool_configso directCustomTool(defer_loading=True)callers continue to work withToolSearchTool()lazy tool discovery.Fixes #1561.