{ "test_id": "tests/integration/inference/test_openai_completion.py::test_openai_chat_completion_with_tools[txt=vllm/Qwen/Qwen3-0.6B-inference:chat_completion:tool_calling]", "request": { "method": "POST", "url": "http://localhost:8000/v1/v1/chat/completions", "headers": {}, "body": { "model": "Qwen/Qwen3-0.6B", "messages": [ { "role": "system", "content": "Pretend you are a weather assistant." }, { "role": "user", "content": "What's the weather like in San Francisco, CA?" } ], "max_tokens": 4096, "stream": false, "tool_choice": "auto", "tools": [ { "type": "function", "function": { "name": "get_weather", "description": "Get the current weather", "parameters": { "type": "object", "properties": { "location": { "type": "string", "description": "The city and state (both required), e.g. San Francisco, CA." } }, "required": [ "location" ] } } } ] }, "endpoint": "/v1/chat/completions", "model": "Qwen/Qwen3-0.6B" }, "response": { "body": { "__type__": "openai.types.chat.chat_completion.ChatCompletion", "__data__": { "id": "rec-744052775cf9", "choices": [ { "finish_reason": "tool_calls", "index": 0, "logprobs": null, "message": { "content": "\nOkay, the user is asking about the weather in San Francisco, CA. I need to use the get_weather function. The function requires the location parameter, which is provided as San Francisco, CA. I should make sure to format the arguments correctly as a JSON object. Let me check the required parameters again. The location is required, so I can't omit it. I'll structure the tool call with the name \"get_weather\" and the arguments including \"location\": \"San Francisco, CA\". That should get the current weather information for the user.\n\n\n", "refusal": null, "role": "assistant", "annotations": null, "audio": null, "function_call": null, "tool_calls": [ { "id": "chatcmpl-tool-b59dc311dd914d3dbd6d455b122bc39c", "function": { "arguments": "{\"location\": \"San Francisco, CA\"}", "name": "get_weather" }, "type": "function" } ], "reasoning_content": null }, "stop_reason": null } ], "created": 0, "model": "Qwen/Qwen3-0.6B", "object": "chat.completion", "service_tier": null, "system_fingerprint": null, "usage": { "completion_tokens": 138, "prompt_tokens": 185, "total_tokens": 323, "completion_tokens_details": null, "prompt_tokens_details": null }, "prompt_logprobs": null, "kv_transfer_params": null } }, "is_streaming": false }, "id_normalization_mapping": {} }