-
-
Notifications
You must be signed in to change notification settings - Fork 11.8k
Closed
Labels
Description
Your current environment
docker run --runtime nvidia --gpus all \
-v ~/.cache/huggingface:/root/.cache/huggingface \
--env "HUGGING_FACE_HUB_TOKEN=$HF_TOKEN" \
-p 8000:8000 \
--ipc=host \
**vllm/vllm-openai:v0.10.2** \
--model openai/gpt-oss-20b
--tool-call-parser openai \
--enable-auto-tool-choice🐛 Describe the bug
while this body works:
{
"model": "openai/gpt-oss-20b",
"messages": [
{
"role": "user",
"content": [
{
"text": "what is the weather in Paris",
"type": "text"
}
]
},
{
"role": "assistant",
"tool_calls": [
{
"function": {
"arguments": "{\"city\": \"Paris\"}",
"name": "get_weather"
},
"id": "chatcmpl-tool-aaae1ecc31344b9d94f69f52a0a4c52e",
"type": "function"
}
]
},
{
"role": "tool",
"tool_call_id": "chatcmpl-tool-aaae1ecc31344b9d94f69f52a0a4c52e",
"content": **"18 degrees"**
}
],
"tools": [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "get weather using city.",
"parameters": {
"type": "object",
"required": []
}
}
}
],
"tool_choice": "auto"
}The next one does not;
{
"model": "openai/gpt-oss-20b",
"messages": [
{
"role": "user",
"content": [
{
"text": "what is the weather in Paris",
"type": "text"
}
]
},
{
"role": "assistant",
"tool_calls": [
{
"function": {
"arguments": "{\"city\": \"Paris\"}",
"name": "get_weather"
},
"id": "chatcmpl-tool-aaae1ecc31344b9d94f69f52a0a4c52e",
"type": "function"
}
]
},
{
"role": "tool",
"tool_call_id": "chatcmpl-tool-aaae1ecc31344b9d94f69f52a0a4c52e",
"content": **[
{
"text": "18 degrees",
"type": "text"
}
]**
}
],
"tools": [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "get weather using city.",
"parameters": {
"type": "object",
"required": []
}
}
}
],
"tool_choice": "auto"
}the output is:
{
"error": {
"message": "1 validation error for Message\ncontent.0\n Input should be a valid dictionary or instance of Content [type=model_type, input_value=[{'text': '18 degrees', 'type': 'text'}], input_type=list]\n For further information visit https://errors.pydantic.dev/2.11/v/model_type None",
"type": "BadRequestError",
"param": null,
"code": 400
}
}according to openai doc and the example in /docs of vllm swagger:
chat-create-messages-tool-message-content
tool message can also be an array
Before submitting a new issue...
- Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done