vllm - 💡(How to fix) Fix [Bug]: [MiniMax] Function call content is not streamed incrementally; buffered until generation completes [1 comments, 2 participants]

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…
GitHub stats
vllm-project/vllm#40779Fetched 2026-04-24 10:36:15
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
0
Author
Timeline (top)
commented ×1labeled ×1

When deploying the MiniMax model via vLLM with streaming enabled (stream: true), the function call (or tool call) payload is not returned token-by-token. Instead, vLLM appears to buffer the entire function call content and only emits it after a noticeable delay, typically right after the generation finishes. This breaks streaming consumers that expect incremental tool_calls.function.arguments chunks.

Root Cause

When deploying the MiniMax model via vLLM with streaming enabled (stream: true), the function call (or tool call) payload is not returned token-by-token. Instead, vLLM appears to buffer the entire function call content and only emits it after a noticeable delay, typically right after the generation finishes. This breaks streaming consumers that expect incremental tool_calls.function.arguments chunks.

Code Example

{
  "model": "<model_name>",
  "messages": [{"role": "user", "content": "Please call the weather function for Beijing"}],
  "tools": [{"type": "function", "function": {"name": "get_weather", "parameters": {"type": "object", "properties": {"location": {"type": "string"}}}}}],
  "stream": true
}
RAW_BUFFERClick to expand / collapse

Your current environment

Environment

vLLM version: 0.18.0 Model: MiniMax-M2.5

🐛 Describe the bug

Description

When deploying the MiniMax model via vLLM with streaming enabled (stream: true), the function call (or tool call) payload is not returned token-by-token. Instead, vLLM appears to buffer the entire function call content and only emits it after a noticeable delay, typically right after the generation finishes. This breaks streaming consumers that expect incremental tool_calls.function.arguments chunks.

Steps to Reproduce

  1. Serve the MiniMax model using vLLM: vllm serve <model_path_or_name> --enable-auto-tool-choice ...
  2. Send a streaming request via the OpenAI-compatible API with a prompt that triggers a function/tool call.
{
  "model": "<model_name>",
  "messages": [{"role": "user", "content": "Please call the weather function for Beijing"}],
  "tools": [{"type": "function", "function": {"name": "get_weather", "parameters": {"type": "object", "properties": {"location": {"type": "string"}}}}}],
  "stream": true
}
  1. Observe the SSE/stream output.

Expected Behavior

Function/tool call tokens (e.g., JSON arguments) should be streamed incrementally as they are generated, consistent with the OpenAI streaming specification and vLLM’s behavior for other supported models (e.g., Qwen, Llama).

Actual Behavior

Normal text streams normally, but once the model begins generating the function call, the stream pauses/buffers. After generation completes (or after a delay), the entire function call payload is returned in a single chunk (or very few chunks), rather than incrementally.

Additional Context

This issue appears specific to MiniMax. Other tool-calling models served via the same vLLM version stream function calls correctly.

We observed that happends both on GPU and NPU.

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.

extent analysis

TL;DR

The issue can be mitigated by investigating the buffering behavior in vLLM when serving the MiniMax model with streaming enabled.

Guidance

  • Verify that the issue is specific to the MiniMax model by testing other models with similar configurations to confirm the behavior.
  • Check the vLLM documentation and configuration options for any settings related to buffering or streaming that might be specific to the MiniMax model.
  • Investigate the OpenAI-compatible API implementation in vLLM to ensure it correctly handles streaming for function calls, especially for the MiniMax model.
  • Consider testing with a different version of vLLM or the MiniMax model to see if the issue persists, which could indicate a version-specific problem.

Example

No specific code example can be provided without more details on the vLLM or MiniMax model implementation.

Notes

The issue seems to be model-specific (MiniMax) and version-specific (vLLM 0.18.0), so any solution or workaround might need to consider these factors. Further investigation into vLLM's handling of the MiniMax model and its streaming functionality is necessary.

Recommendation

Apply workaround: Given the model-specific nature of the issue, applying a workaround that either adjusts the streaming settings for the MiniMax model or implements a custom streaming handler might be necessary until a more permanent fix is available.

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]: [MiniMax] Function call content is not streamed incrementally; buffered until generation completes [1 comments, 2 participants]