Skip to content

fix: export MCPListToolsItem, ToolSearchCallItem, and ToolSearchOutputItem from agents#3490

Merged
seratch merged 1 commit into
openai:mainfrom
rmotgi1227:fix/export-missing-run-items
May 22, 2026
Merged

fix: export MCPListToolsItem, ToolSearchCallItem, and ToolSearchOutputItem from agents#3490
seratch merged 1 commit into
openai:mainfrom
rmotgi1227:fix/export-missing-run-items

Conversation

@rmotgi1227
Copy link
Copy Markdown
Contributor

Three RunItem subclasses are accessible via agents.items but are not exported from the top-level agents module:

All other RunItem types (HandoffCallItem, ToolCallItem, ToolCallOutputItem, MCPApprovalRequestItem, etc.) are already exported from the top-level package. These three were added in later PRs but their exports in __init__.py were missed.

Anyone writing a custom HandoffInputFilter or inspecting run items would currently need to reach into agents.items directly:

# currently breaks:
from agents import MCPListToolsItem  # ImportError
from agents import ToolSearchCallItem  # ImportError

# workaround (internal import path):
from agents.items import MCPListToolsItem, ToolSearchCallItem

The fix adds the three names to the from .items import ... block and to __all__ in src/agents/__init__.py.

@seratch seratch changed the title fix: export MCPListToolsItem, ToolSearchCallItem, and ToolSearchOutputItem from top-level agents package fix: export MCPListToolsItem, ToolSearchCallItem, and ToolSearchOutputItem from agents May 22, 2026
@seratch seratch added this to the 0.17.x milestone May 22, 2026
@seratch seratch enabled auto-merge (squash) May 22, 2026 01:04
@seratch seratch merged commit fedc809 into openai:main May 22, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants