Skip to content

Commit 4bb4400

Browse files
fix: filter custom_tool_call types in remove_all_tools handoff filter (#3095)
1 parent 4b5a0b8 commit 4bb4400

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

src/agents/extensions/handoff_filters.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ def _remove_tool_types_from_input(
9696
"shell_call_output",
9797
"apply_patch_call",
9898
"apply_patch_call_output",
99+
"custom_tool_call",
100+
"custom_tool_call_output",
99101
]
100102

101103
filtered_items: list[TResponseInputItem] = []

tests/test_extension_filters.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,6 +1041,8 @@ def test_removes_hosted_tool_types_from_input_history() -> None:
10411041
"shell_call_output",
10421042
"apply_patch_call",
10431043
"apply_patch_call_output",
1044+
"custom_tool_call",
1045+
"custom_tool_call_output",
10441046
]
10451047
input_items: list[TResponseInputItem] = [_get_message_input_item("Hello")]
10461048
for t in hosted_types:

0 commit comments

Comments
 (0)