Skip to content

Support vLLM v0.12.0 #1180

Support vLLM v0.12.0

Support vLLM v0.12.0 #1180

Triggered via issue December 12, 2025 07:37
@pan-x-cpan-x-c
commented on #438 2f1a587
Status Failure
Total duration 11m 20s
Artifacts –

unittest.yaml

on: issue_comment
Fit to window
Zoom out
Zoom in

Annotations

6 errors
unittest
Process completed with exit code 1.
Failed Test: tests/common/vllm_test.py::TestAPIServerToolCall_1::test_api_tool_calls
tests/common/vllm_test.py::TestAPIServerToolCall_1::test_api_tool_calls: The test failed in the call phase - self = <tests.common.vllm_test.TestAPIServerToolCall_1 testMethod=test_api_tool_calls> async def test_api_tool_calls(self): """Tests the full conversation flow of a tool call via the OpenAI API. Note: This test require a model that supports tool calls and thinking mode, e.g. Qwen3-1.7B. """ import json import time await prepare_engines(self.engines, self.auxiliary_engines) await self.model_wrapper.prepare() await self.model_wrapper_no_history.prepare() tokenizer = AutoTokenizer.from_pretrained(get_api_model_path()) print_debug("\n\n" + "=" * 30 + " Running test_api_tool_calls " + "=" * 30) start_time = time.time() # --- Step 0: Get OpenAI Client --- print_debug(f"[{time.time() - start_time:.2f}s] Getting OpenAI client...") openai_client = self.model_wrapper.get_openai_client() model_id = openai_client.models.list().data[0].id print_debug( f"[{time.time() - start_time:.2f}s] Successfully got client. Model ID: {model_id}" ) # --- Step 1: Define Tools and Messages --- print_debug(f"[{time.time() - start_time:.2f}s] Defining tools and initial message...") tools = [ { "type": "function", "function": { "name": "get_current_weather", "description": "Get the current weather in a given location", "parameters": { "type": "object", "properties": { "location": { "type": "string", "description": "The city and state, e.g. San Francisco, CA", }, "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}, }, "required": ["location"], }, }, } ] messages = [{"role": "user", "content": "What's the weather like in Boston?"}] print_debug( f"[{time.time() - start_time:.2f}s] Initial user message: {messages[0]['content']}" ) print_debug("-" * 80) # --- Step 2: First API Call (Expecting a tool call) --- print_debug(f"[{time.time() - start_time:.2f}s] Making first API call to the model...") > response = openai_client.chat.completions.create( model=model_id, messages=messages, tools=tools, tool_choice="auto", extra_body={ "repetition_penalty": 1.05, "chat_template_kwargs": { "enable_thinking": self.enable_thinking }, # default to True }, ) tests/common/vllm_test.py:962: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = () kwargs = {'extra_body': {'chat_template_kwargs': {'enable_thinking': False}, 'repetition_penalty': 1.05, 'return_token_ids': Tr... "What's the weather like in Boston?", 'role': 'user'}], 'model': '/mnt/models/Qwen3-1.7B', 'tool_choice': 'auto', ...} extra_body = {'chat_template_kwargs': {'enable_thinking': False}, 'repetition_penalty': 1.05, 'return_token_ids': True} def record_chat_completions(*args, **kwargs): extra_body = kwargs.get("extra_body", {}) if self.enable_thinking is not None: if "chat_template_kwargs" not in extra_body: extra_body["chat_template_kwargs"] = {} extra_body["chat_template_kwargs"]["enable_thinking"] = self.enable_thinking extra_body["return_token_ids"] = True > response = ori_create(*args, extra_body=extra_body, logprobs=True, **kwargs) E TypeError: openai.resources.chat.completions.completions.Completions.create() got multiple values for keyword argument 'extra_body' tri
Failed Test: tests/common/vllm_test.py::TestAPIServerToolCall_0_deepseek_r1::test_api_tool_calls
tests/common/vllm_test.py::TestAPIServerToolCall_0_deepseek_r1::test_api_tool_calls: The test failed in the call phase - self = <tests.common.vllm_test.TestAPIServerToolCall_0_deepseek_r1 testMethod=test_api_tool_calls> async def test_api_tool_calls(self): """Tests the full conversation flow of a tool call via the OpenAI API. Note: This test require a model that supports tool calls and thinking mode, e.g. Qwen3-1.7B. """ import json import time await prepare_engines(self.engines, self.auxiliary_engines) await self.model_wrapper.prepare() await self.model_wrapper_no_history.prepare() tokenizer = AutoTokenizer.from_pretrained(get_api_model_path()) print_debug("\n\n" + "=" * 30 + " Running test_api_tool_calls " + "=" * 30) start_time = time.time() # --- Step 0: Get OpenAI Client --- print_debug(f"[{time.time() - start_time:.2f}s] Getting OpenAI client...") openai_client = self.model_wrapper.get_openai_client() model_id = openai_client.models.list().data[0].id print_debug( f"[{time.time() - start_time:.2f}s] Successfully got client. Model ID: {model_id}" ) # --- Step 1: Define Tools and Messages --- print_debug(f"[{time.time() - start_time:.2f}s] Defining tools and initial message...") tools = [ { "type": "function", "function": { "name": "get_current_weather", "description": "Get the current weather in a given location", "parameters": { "type": "object", "properties": { "location": { "type": "string", "description": "The city and state, e.g. San Francisco, CA", }, "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}, }, "required": ["location"], }, }, } ] messages = [{"role": "user", "content": "What's the weather like in Boston?"}] print_debug( f"[{time.time() - start_time:.2f}s] Initial user message: {messages[0]['content']}" ) print_debug("-" * 80) # --- Step 2: First API Call (Expecting a tool call) --- print_debug(f"[{time.time() - start_time:.2f}s] Making first API call to the model...") > response = openai_client.chat.completions.create( model=model_id, messages=messages, tools=tools, tool_choice="auto", extra_body={ "repetition_penalty": 1.05, "chat_template_kwargs": { "enable_thinking": self.enable_thinking }, # default to True }, ) tests/common/vllm_test.py:962: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = () kwargs = {'extra_body': {'chat_template_kwargs': {'enable_thinking': True}, 'repetition_penalty': 1.05, 'return_token_ids': Tru... "What's the weather like in Boston?", 'role': 'user'}], 'model': '/mnt/models/Qwen3-1.7B', 'tool_choice': 'auto', ...} extra_body = {'chat_template_kwargs': {'enable_thinking': True}, 'repetition_penalty': 1.05, 'return_token_ids': True} def record_chat_completions(*args, **kwargs): extra_body = kwargs.get("extra_body", {}) if self.enable_thinking is not None: if "chat_template_kwargs" not in extra_body: extra_body["chat_template_kwargs"] = {} extra_body["chat_template_kwargs"]["enable_thinking"] = self.enable_thinking extra_body["return_token_ids"] = True > response = ori_create(*args, extra_body=extra_body, logprobs=True, **kwargs) E TypeError: openai.resources.chat.completions.completions.Completions.create() got multiple values for keyword arg
Failed Test: tests/common/vllm_test.py::TestAsyncAPIServer::test_api_async
tests/common/vllm_test.py::TestAsyncAPIServer::test_api_async: The test failed in the call phase due to an assertion error - self = <tests.common.vllm_test.TestAsyncAPIServer testMethod=test_api_async> async def test_api_async(self): await prepare_engines(self.engines, self.auxiliary_engines) await self.model_wrapper.prepare() await self.model_wrapper_no_history.prepare() openai_client = self.model_wrapper.get_openai_async_client() messages = [ {"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "What is your name?"}, ] model_id = (await openai_client.models.list()).data[0].id response = await openai_client.chat.completions.create( model=model_id, messages=messages, n=1 ) self.assertEqual(1, len(response.choices)) self.assertTrue(len(response.choices[0].message.content) > 0) response = await openai_client.chat.completions.create( model=model_id, messages=messages, n=2, temperature=0.5, logprobs=True, top_logprobs=0, ) self.assertEqual(2, len(response.choices)) self.assertTrue(response.choices[0].logprobs is not None) self.assertEqual(0, len(response.choices[0].logprobs.content[2].top_logprobs)) # here we check the 3rd token logprob, because the first two tokens (`<think>`,`\n` usually have zero logprob) self.assertTrue(response.choices[0].logprobs.content[2].logprob < 0) self.assertTrue(hasattr(response, "prompt_token_ids")) self.assertTrue(len(response.prompt_token_ids) > 0) self.assertTrue(hasattr(response.choices[0], "token_ids")) self.assertTrue(len(response.choices[0].token_ids) > 0) exps = self.model_wrapper.extract_experience_from_history() self.assertEqual(len(exps), 3) response = await openai_client.chat.completions.create( model=model_id, messages=messages, n=4, temperature=0.5, logprobs=True, top_logprobs=0, ) exps = self.model_wrapper.extract_experience_from_history() self.assertEqual(len(exps), 4) for exp in exps: self.assertTrue(len(exp.tokens) > 0) self.assertTrue(len(exp.logprobs) > 0) self.assertTrue(exp.prompt_length + len(exp.logprobs) == len(exp.tokens)) self.assertEqual(len(self.model_wrapper.extract_experience_from_history()), 0) response = await openai_client.chat.completions.create( model=model_id, messages=messages, ) exps = self.model_wrapper.extract_experience_from_history() self.assertEqual(len(exps), 1) self.assertTrue(len(exps[0].tokens) > 0) self.assertTrue(len(exps[0].logprobs) > 0) self.assertTrue(exps[0].prompt_length + len(exps[0].logprobs) == len(exps[0].tokens)) response = await openai_client.chat.completions.create( model=model_id, messages=messages, logprobs=False, ) exps = self.model_wrapper.extract_experience_from_history() self.assertEqual(len(exps), 1) > self.assertTrue(len(exps[0].logprobs) == 0) E AssertionError: False is not true tests/common/vllm_test.py:759: AssertionError
Failed Test: tests/common/vllm_test.py::TestAPIServer::test_api
tests/common/vllm_test.py::TestAPIServer::test_api: The test failed in the call phase - self = <tests.common.vllm_test.TestAPIServer testMethod=test_api> async def test_api(self): await prepare_engines(self.engines, self.auxiliary_engines) await self.model_wrapper.prepare() await self.model_wrapper_no_history.prepare() openai_client = self.model_wrapper.get_openai_client() messages = [ {"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "What is your name?"}, ] model_id = openai_client.models.list().data[0].id response = openai_client.chat.completions.create(model=model_id, messages=messages, n=1) self.assertEqual(1, len(response.choices)) self.assertTrue(len(response.choices[0].message.content) > 0) > response = openai_client.chat.completions.create( model=model_id, messages=messages, n=2, temperature=0.5, logprobs=True, top_logprobs=0, ) tests/common/vllm_test.py:389: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = () kwargs = {'logprobs': True, 'messages': [{'content': 'You are a helpful assistant.', 'role': 'system'}, {'content': 'What is your name?', 'role': 'user'}], 'model': '/mnt/models/Qwen3-0.6B', 'n': 2, ...} extra_body = {'return_token_ids': True} def record_chat_completions(*args, **kwargs): extra_body = kwargs.get("extra_body", {}) if self.enable_thinking is not None: if "chat_template_kwargs" not in extra_body: extra_body["chat_template_kwargs"] = {} extra_body["chat_template_kwargs"]["enable_thinking"] = self.enable_thinking extra_body["return_token_ids"] = True > response = ori_create(*args, extra_body=extra_body, logprobs=True, **kwargs) E TypeError: openai.resources.chat.completions.completions.Completions.create() got multiple values for keyword argument 'logprobs' trinity/common/models/model.py:326: TypeError
unittest
Process completed with exit code 1.