Skip to content

Commit e2ffa73

Browse files
titanousclaude
andcommitted
Remove unsupported container tool references from structural tag code
The container tool was referenced in the structural tag implementation but ToolNamespaceConfig.container() does not exist in the openai_harmony library, which would cause AttributeError at runtime if the container tool was used. Changes: - Remove container tool handling from from_builtin_tool_to_tag() in gptoss_reasoning_parser.py - Remove enable_container logic from serving_responses.py - Update tests to remove container tool test cases - Keep all structural tag improvements for browser and python tools The container tool support was originally added in PR vllm-project#23386 but the openai_harmony library never implemented ToolNamespaceConfig.container(). This commit removes only the non-functional container references while preserving all working functionality. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 518c248 commit e2ffa73

File tree

3 files changed

+6
-27
lines changed

3 files changed

+6
-27
lines changed

tests/entrypoints/openai/test_gptoss_structural_tags_integration.py

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -107,20 +107,18 @@ def test_structured_outputs_params_integration(
107107
assert parsed_tag["type"] == "structural_tag"
108108

109109
@pytest.mark.parametrize(
110-
"browser, python, container, expected_tags",
110+
"browser, python, expected_tags",
111111
[
112112
# No tools
113-
(False, False, False, 1),
113+
(False, False, 1),
114114
# Browser only: 3 functions × 2 channels + 1 analysis = 7
115-
(True, False, False, 7),
115+
(True, False, 7),
116116
# Browser + Python: 6 + 2 + 1 analysis = 9
117-
(True, True, False, 9),
118-
# All tools: 6 (browser) + 2 (python) + 2 (container) + 1 (analysis) = 11
119-
(True, True, True, 11),
117+
(True, True, 9),
120118
],
121119
)
122120
def test_tool_server_interaction_flow(
123-
self, gptoss_parser, browser, python, container, expected_tags
121+
self, gptoss_parser, browser, python, expected_tags
124122
):
125123
"""Test the complete tool server interaction flow."""
126124

@@ -132,7 +130,6 @@ def test_tool_server_interaction_flow(
132130
side_effect=lambda tool: {
133131
"browser": browser,
134132
"python": python,
135-
"container": container,
136133
}.get(tool, False)
137134
)
138135

@@ -152,8 +149,6 @@ def test_tool_server_interaction_flow(
152149
assert any("to=browser.find" in begin for begin in tag_begins)
153150
if python:
154151
assert any("to=python<|channel|>" in begin for begin in tag_begins)
155-
if container:
156-
assert any("to=container<|channel|>" in begin for begin in tag_begins)
157152

158153
def test_original_tag_preservation(self, gptoss_parser, tool_server_with_python):
159154
"""Test that original tags are preserved when provided."""
@@ -172,11 +167,7 @@ def test_original_tag_preservation(self, gptoss_parser, tool_server_with_python)
172167
[],
173168
["browser"],
174169
["python"],
175-
["container"],
176170
["browser", "python"],
177-
["browser", "container"],
178-
["python", "container"],
179-
["browser", "python", "container"],
180171
],
181172
)
182173
def test_json_validity_comprehensive(self, gptoss_parser, tools):

vllm/entrypoints/openai/serving_responses.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -920,11 +920,6 @@ def _construct_harmony_system_input_message(
920920
and self.tool_server is not None
921921
and self.tool_server.has_tool("python")
922922
)
923-
enable_container = (
924-
"container" in tool_types
925-
and self.tool_server is not None
926-
and self.tool_server.has_tool("container")
927-
)
928923
sys_msg = get_system_message(
929924
reasoning_effort=reasoning_effort,
930925
browser_description=(
@@ -937,11 +932,6 @@ def _construct_harmony_system_input_message(
937932
if enable_code_interpreter and self.tool_server is not None
938933
else None
939934
),
940-
container_description=(
941-
self.tool_server.get_tool_description("container")
942-
if enable_container and self.tool_server is not None
943-
else None
944-
),
945935
instructions=request.instructions,
946936
with_custom_tools=with_custom_tools,
947937
)

vllm/reasoning/gptoss_reasoning_parser.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def from_builtin_tool_to_tag(tool: str) -> list[dict]:
3434
"""Generate structural tags for a builtin tool with proper JSON schemas.
3535
3636
Args:
37-
tool: Tool name (e.g., "browser", "python", "container")
37+
tool: Tool name (e.g., "browser", "python")
3838
3939
Returns:
4040
List of tag dictionaries with correct Harmony format patterns and schemas
@@ -46,8 +46,6 @@ def from_builtin_tool_to_tag(tool: str) -> list[dict]:
4646
config = ToolNamespaceConfig.browser()
4747
elif tool == "python":
4848
config = ToolNamespaceConfig.python()
49-
elif tool == "container":
50-
config = ToolNamespaceConfig.container()
5149
else:
5250
config = None
5351

0 commit comments

Comments
 (0)