@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 780eb03d9b
Fork 0

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 14, 05:30 UTC

[CI] Fix test_tool_id_kimi_k2 (#26787)

Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>

Chauncey committed Oct 14, 2025 at 18:27 UTC 780eb03d9b5da36325ab5ebddbf23bec31a789df
1 file changed +8 -5
tests/entrypoints/openai/test_completion_with_function_calling.py
+8 -5
@@ -247,10 +247,10 @@ async def test_tool_id_kimi_k2(
247 )
248 assert chat_completion.choices[0].message.tool_calls is not None
249 assert len(chat_completion.choices[0].message.tool_calls) > 0
250 - assert (
251 - chat_completion.choices[0].message.tool_calls[0].id
252 - == "functions.get_current_weather:0"
253 - )
250 + assert chat_completion.choices[0].message.tool_calls[0].id in [
251 + "functions.get_current_weather:0",
252 + "functions.get_forecast:1",
253 + ]
254 else:
255 # Streaming test
256 output_stream = await k2_client.chat.completions.create(
@@ -266,7 +266,10 @@ async def test_tool_id_kimi_k2(
266 if chunk.choices and chunk.choices[0].delta.tool_calls:
267 output.extend(chunk.choices[0].delta.tool_calls)
268 for o in output:
269 - assert o.id is None or o.id == "functions.get_current_weather:0"
269 + assert o.id is None or o.id in [
270 + "functions.get_current_weather:0",
271 + "functions.get_forecast:1",
272 + ]
273
274
275 @pytest.mark.asyncio