[Bugfix] Handle real-world gpt-oss tool call output in Harmony parsing (#42454)

Signed-off-by: Ben Browning <bbrownin@redhat.com>
This commit is contained in:
Ben Browning
2026-05-13 17:54:46 +00:00
committed by GitHub
parent b3c69595a6
commit 0f69128a37
12 changed files with 801 additions and 50 deletions
@@ -236,6 +236,10 @@ def _construct_message_from_response_item(
return item # type: ignore[arg-type]
def extract_function_tool_names(tools: list[Tool]) -> frozenset[str]:
return frozenset(tool.name for tool in tools if tool.type == "function")
def extract_tool_types(tools: list[Tool]) -> set[str]:
"""
Extracts the tool types from the given tools.