Skip to content

Commit cb7211b

Browse files
authored
fix: filter hosted_tool_call types in remove_all_tools handoff filter (#3386)
1 parent 43a389d commit cb7211b

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

src/agents/extensions/handoff_filters.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ def _remove_tool_types_from_input(
104104
"apply_patch_call_output",
105105
"custom_tool_call",
106106
"custom_tool_call_output",
107+
"hosted_tool_call",
107108
]
108109

109110
filtered_items: list[TResponseInputItem] = []

tests/test_extension_filters.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,6 +1130,7 @@ def test_removes_hosted_tool_types_from_input_history() -> None:
11301130
"apply_patch_call_output",
11311131
"custom_tool_call",
11321132
"custom_tool_call_output",
1133+
"hosted_tool_call",
11331134
]
11341135
input_items: list[TResponseInputItem] = [_get_message_input_item("Hello")]
11351136
for t in hosted_types:

0 commit comments

Comments
 (0)