A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 2, 09:45 UTC
[CI] Remove redundant test_chat_with_tool_reasoning.py (#44011)
Signed-off-by: sfeng33 <4florafeng@gmail.com>
Flora Feng committed
May 29, 2026 at 15:23 UTC
6de08e8b46e082172bc146cf8031b29d9fdcab92
4 files changed
+5
-146
.buildkite/test-amd.yaml
+2
-2
@@ -1261,7 +1261,7 @@ steps:
1261
- tests/entrypoints/test_chat_utils
1262
commands:
1263
- export VLLM_WORKER_MULTIPROC_METHOD=spawn
1264
- - pytest -v -s entrypoints/openai/chat_completion --ignore=entrypoints/openai/chat_completion/test_chat_with_tool_reasoning.py --ignore=entrypoints/openai/chat_completion/test_oot_registration.py
1264
+ - pytest -v -s entrypoints/openai/chat_completion --ignore=entrypoints/openai/chat_completion/test_oot_registration.py
1265
1266
- label: Entrypoints Integration (API Server openai - Part 2) # TBD
1267
timeout_in_minutes: 180
@@ -2768,7 +2768,7 @@ steps:
2768
- tests/entrypoints/test_chat_utils
2769
commands:
2770
- export VLLM_WORKER_MULTIPROC_METHOD=spawn
2771
- - pytest -v -s entrypoints/openai/chat_completion --ignore=entrypoints/openai/chat_completion/test_chat_with_tool_reasoning.py --ignore=entrypoints/openai/chat_completion/test_oot_registration.py
2771
+ - pytest -v -s entrypoints/openai/chat_completion --ignore=entrypoints/openai/chat_completion/test_oot_registration.py
2772
2773
- label: Entrypoints Integration (API Server openai - Part 2) # TBD
2774
timeout_in_minutes: 180
.buildkite/test_areas/entrypoints.yaml
+1
-1
@@ -43,7 +43,7 @@ steps:
43
- tests/entrypoints/test_chat_utils
44
commands:
45
- export VLLM_WORKER_MULTIPROC_METHOD=spawn
46
- - pytest -v -s entrypoints/openai/chat_completion --ignore=entrypoints/openai/chat_completion/test_chat_with_tool_reasoning.py --ignore=entrypoints/openai/chat_completion/test_oot_registration.py
46
+ - pytest -v -s entrypoints/openai/chat_completion --ignore=entrypoints/openai/chat_completion/test_oot_registration.py
47
mirror:
48
amd:
49
device: mi325_1
.buildkite/test_areas/rust_frontend.yaml
+2
-2
@@ -16,7 +16,7 @@ steps:
16
- tests/benchmarks/test_serve_cli.py
17
- tests/entrypoints/openai/chat_completion/test_chat_completion.py
18
# - tests/entrypoints/openai/chat_completion/test_chat_logit_bias_validation.py
19
- # - tests/entrypoints/openai/chat_completion/test_chat_with_tool_reasoning.py
19
+
20
# - tests/entrypoints/openai/completion/test_prompt_validation.py
21
- tests/entrypoints/openai/completion/test_shutdown.py
22
# - tests/entrypoints/openai/test_return_token_ids.py
@@ -28,7 +28,7 @@ steps:
28
- pytest -v -s benchmarks/test_serve_cli.py -k "not insecure and not (test_bench_serve and not test_bench_serve_chat)"
29
- pytest -v -s entrypoints/openai/chat_completion/test_chat_completion.py
30
# - pytest -v -s entrypoints/openai/chat_completion/test_chat_logit_bias_validation.py -k "not invalid"
31
- # - pytest -v -s entrypoints/openai/chat_completion/test_chat_with_tool_reasoning.py
31
+
32
# - pytest -v -s entrypoints/openai/completion/test_prompt_validation.py -k "not prompt_embeds"
33
- pytest -v -s entrypoints/openai/completion/test_shutdown.py -k "not engine_failure and not test_abort_timeout_exits_quickly"
34
# - pytest -v -s entrypoints/openai/test_return_token_ids.py
tests/entrypoints/openai/chat_completion/test_chat_with_tool_reasoning.py
deleted
-141
@@ -1,141 +0,0 @@
1
-# SPDX-License-Identifier: Apache-2.0
2
-# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3
-
4
-import openai # use the official client for correctness check
5
-import pytest
6
-import pytest_asyncio
7
-
8
-from tests.utils import RemoteOpenAIServer
9
-
10
-# a reasoning and tool calling model
11
-MODEL_NAME = "Qwen/QwQ-32B"
12
-
13
-
14
-@pytest.fixture(scope="module")
15
-def server():
16
- args = [
17
- "--max-model-len",
18
- "8192",
19
- "--enforce-eager",
20
- "--reasoning-parser",
21
- "deepseek_r1",
22
- "--enable-auto-tool-choice",
23
- "--tool-call-parser",
24
- "hermes",
25
- ]
26
-
27
- with RemoteOpenAIServer(MODEL_NAME, args) as remote_server:
28
- yield remote_server
29
-
30
-
31
-@pytest_asyncio.fixture
32
-async def client(server):
33
- async with server.get_async_client() as async_client:
34
- yield async_client
35
-
36
-
37
-TOOLS = [
38
- {
39
- "type": "function",
40
- "function": {
41
- "name": "get_current_weather",
42
- "description": "Get the current weather in a given location",
43
- "parameters": {
44
- "type": "object",
45
- "properties": {
46
- "city": {
47
- "type": "string",
48
- "description": "The city to find the weather for, e.g. "
49
- "'San Francisco'",
50
- },
51
- "state": {
52
- "type": "string",
53
- "description": "the two-letter abbreviation for the state that "
54
- "the city is in, e.g. 'CA' which would mean 'California'",
55
- },
56
- "unit": {
57
- "type": "string",
58
- "description": "The unit to fetch the temperature in",
59
- "enum": ["celsius", "fahrenheit"],
60
- },
61
- },
62
- "required": ["city", "state", "unit"],
63
- },
64
- },
65
- }
66
-]
67
-
68
-MESSAGES = [
69
- {"role": "user", "content": "Hi! How are you doing today?"},
70
- {"role": "assistant", "content": "I'm doing well! How can I help you?"},
71
- {
72
- "role": "user",
73
- "content": "Can you tell me what the temperate will be in Dallas, "
74
- "in fahrenheit?",
75
- },
76
-]
77
-
78
-FUNC_NAME = "get_current_weather"
79
-FUNC_ARGS = """{"city": "Dallas", "state": "TX", "unit": "fahrenheit"}"""
80
-
81
-
82
-def extract_reasoning_and_calls(chunks: list):
83
- reasoning = ""
84
- tool_call_idx = -1
85
- arguments = []
86
- function_names = []
87
- for chunk in chunks:
88
- if chunk.choices[0].delta.tool_calls:
89
- tool_call = chunk.choices[0].delta.tool_calls[0]
90
- if tool_call.index != tool_call_idx:
91
- tool_call_idx = chunk.choices[0].delta.tool_calls[0].index
92
- arguments.append("")
93
- function_names.append("")
94
-
95
- if tool_call.function:
96
- if tool_call.function.name:
97
- function_names[tool_call_idx] = tool_call.function.name
98
-
99
- if tool_call.function.arguments:
100
- arguments[tool_call_idx] += tool_call.function.arguments
101
- else:
102
- if hasattr(chunk.choices[0].delta, "reasoning"):
103
- reasoning += chunk.choices[0].delta.reasoning
104
- return reasoning, arguments, function_names
105
-
106
-
107
-# test streaming
108
-@pytest.mark.asyncio
109
-async def test_chat_streaming_of_tool_and_reasoning(client: openai.AsyncOpenAI):
110
- stream = await client.chat.completions.create(
111
- model=MODEL_NAME,
112
- messages=MESSAGES,
113
- tools=TOOLS,
114
- temperature=0.0,
115
- stream=True,
116
- )
117
-
118
- chunks = []
119
- async for chunk in stream:
120
- chunks.append(chunk)
121
-
122
- reasoning, arguments, function_names = extract_reasoning_and_calls(chunks)
123
- assert len(reasoning) > 0
124
- assert len(function_names) > 0 and function_names[0] == FUNC_NAME
125
- assert len(arguments) > 0 and arguments[0] == FUNC_ARGS
126
-
127
-
128
-# test full generate
129
-@pytest.mark.asyncio
130
-async def test_chat_full_of_tool_and_reasoning(client: openai.AsyncOpenAI):
131
- tool_calls = await client.chat.completions.create(
132
- model=MODEL_NAME,
133
- messages=MESSAGES,
134
- tools=TOOLS,
135
- temperature=0.0,
136
- stream=False,
137
- )
138
-
139
- assert len(tool_calls.choices[0].message.reasoning) > 0
140
- assert tool_calls.choices[0].message.tool_calls[0].function.name == FUNC_NAME
141
- assert tool_calls.choices[0].message.tool_calls[0].function.arguments == FUNC_ARGS