vllm - 💡(How to fix) Fix [Bug]: GLM5.1 tool call (with MTP) in streaming mode, arguments cannot be combined as a complete dict

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Code Example

Your output of `python collect_env.py` here
RAW_BUFFERClick to expand / collapse

Your current environment

<details> <summary>The output of <code>python collect_env.py</code></summary>
Your output of `python collect_env.py` here
</details>

🐛 Describe the bug

the configuration I used: vllm serve /mnt/paas/GLM-5.1
--host 0.0.0.0
--port 8008
--data-parallel-size 1
--tensor-parallel-size 8
--seed 1024
--served-model-name glm-5.1
--enable-expert-parallel
--max-num-seqs 8
--max-model-len 8192
--max-num-batched-tokens 2048
--trust-remote-code
--no-enable-prefix-caching
--gpu-memory-utilization 0.9
--compilation-config '{"cudagraph_mode": "FULL_DECODE_ONLY", "cudagraph_capture_sizes":[1,2,4,8,16]}'
--tool-call-parser glm47
--reasoning-parser glm45
--enable-auto-tool-choice
--speculative-config '{"method": "mtp", "num_speculative_tokens": 3}'

the response I got: curl --location --request POST 'http://localhost:8008/v1/chat/completions'
--header 'Content-Type: application/json'
--data-raw '{ "model": "glm-5.1", "messages":[ { "role": "system", ?提问的方式让用户提供。如果没有function满足条件,则直接根据情况回答问题。".果参数是必填的,而用户没有提供,你需要以.天是2025- }, { "role": "user", "content": "记账,昨天走高速花了300元" } ], "temperature": 0, "max_completion_tokens": 4096, "stream": true, "tools": [{ "type": "function", "function": { "name": "record_bill", "description": "记账功能", "parameters": { "properties": { "date": { "description": "账单日期,严格格式:YYYY-MM-DD,默认今天", "type": "string" }, "amount": { "description": "人民币金额,精确到2位小数,必须提供", "type": "number" }, "fee_type": { "description": "消费类型或收入类型,无法划分选其他", "type": "string", "enum": ["加油费", "食宿费", "过路费", "维修费", "保养费", "其他"] }, "income_type": { "description": "收入或者支出", }' ] } } } "type": "object"te", "amount", "fee_type", "income_type"], data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"role":"assistant","content":""},"logprobs":null,"finish_reason":null}],"prompt_token_ids":null}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"reasoning":"The"},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"reasoning":" user wants to record"},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"reasoning":" a bill"},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"reasoning":". Let"},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"reasoning":" me extract"},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"reasoning":" the parameters"},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"reasoning":":\n\n- date"},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"reasoning":": 昨天"},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"reasoning":","},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"reasoning":"今天是2025-"},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"reasoning":"03-27"},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"reasoning":",所以昨天是"},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"reasoning":"2025"},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"reasoning":"-03-26"},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"reasoning":"\n- amount"},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"reasoning":": 300"},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"reasoning":"元\n- fee"},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"reasoning":"_type:"},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"reasoning":" 走高速"},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"reasoning":" →"},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"reasoning":" 过路费\n"},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"reasoning":"- income_type"},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"reasoning":":"},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"reasoning":" 花了"},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"reasoning":" → 支出"},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"content":"好的"},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"content":",我来帮您"},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"content":"记录这笔"},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"content":"过"},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"content":"路费支出"},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"content":"。"},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"tool_calls":[{"id":"chatcmpl-tool-b7da8b7575b43d18","type":"function","index":0,"function":{"name":"record_bill","arguments":""}}]},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{"date": ""}}]},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"2025-03-26""}}]},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":","amount": 300"}}]},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":", "fee_type": ""}}]},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"过路费""}}]},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":", "income_type": ""}}]},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"支出""}}]},"logprobs":null,"finish_reason":null,"token_ids":null}]}

data: {"id":"chatcmpl-8b6e41238cd6bef0","object":"chat.completion.chunk","created":1778335909,"model":"glm-5.1","choices":[{"index":0,"delta":{"tool_calls":[{"id":null,"type":null,"index":0,"function":{"name":null,"arguments":"{"date": "2025-03-26", "amount": 300, "fee_type": "过路费", "income_type": "支出"}"}}]},"logprobs":null,"finish_reason":"tool_calls","stop_reason":154829,"token_ids":null}]}

data: [DONE]

I think the last chunk is not correct, I used the v0.19.0 vllm. the whole result of arguments is not a complete dict

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.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

vllm - 💡(How to fix) Fix [Bug]: GLM5.1 tool call (with MTP) in streaming mode, arguments cannot be combined as a complete dict