Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ async def _wrapped_chat_completion_stream_generator(
tokenizer,
request_metadata: engine_protocol.RequestResponseMetadata,
reasoning_parser=None,
**extra_kwargs: Any,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The pull request title and summary do not adhere to the repository style guide. The title is missing the module prefix, and the summary sections for user-facing changes and testing are incomplete.

Suggested PR Title:

[Ops][BugFix] Changed the minimax wrapper to accept **extra_kwargs

Suggested PR Summary:

### What this PR does / why we need it?

This PR updates the `_wrapped_chat_completion_stream_generator` to accept and forward `**extra_kwargs`. This ensures compatibility with recent changes in upstream vLLM where `chat_template_kwargs` was added to the signature, preventing `TypeError` when these arguments are passed.

Fixes #

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

(Please provide details on how this change was verified, e.g., manual testing with affected models or CI results).
References
  1. PR Title and Summary must follow the specified format and include all required sections with content. (link)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The fix applied to _wrapped_chat_completion_stream_generator should also be applied to _wrapped_chat_completion_full_generator (starting at line 327). Currently, the non-streaming generator is still missing the **extra_kwargs parameter and does not forward it to the original generator, which will cause a TypeError when upstream vLLM passes new parameters like chat_template_kwargs through the non-streaming path.

):
num_choices = 1 if request.n is None else request.n
state = _create_usage_tracking_state(num_choices, reasoning_parser)
Expand All @@ -314,6 +315,7 @@ async def _wrapped_chat_completion_stream_generator(
tokenizer,
request_metadata,
reasoning_parser,
**extra_kwargs,
):
yield _inject_stream_usage_details(data, state)

Expand Down
Loading