Skip to content

Conversation

lordmathis
Copy link
Contributor

@lordmathis lordmathis commented Aug 26, 2025

The --enable-log-outputs feature implemented in PR #20707 was missing the connection between the CLI argument and the OpenAIServingChat constructor when using vllm.entrypoints.openai.api_server as your entrypoint. This PR adds the missing enable_log_outputs=args.enable_log_outputs parameter to make the feature functional.

Purpose

Fix broken --enable-log-outputs functionality

Test Plan

Run vllm serve with --enable-log-outputs flag

Test Result

Outputs are logged:

(APIServer pid=16079) INFO 08-26 10:15:31 [logger.py:71] Generated response chatcmpl-f27a5a32690542b59c73d4e094c091ae: output: 'Hello there!', output_token_ids: [19556, 665, 17, 2], finish_reason: stop

Essential Elements of an Effective PR Description Checklist
  • [x ] The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly fixes a bug where the --enable-log-outputs command-line argument was not being passed to the OpenAIServingChat handler, thus re-enabling output logging for chat completions. The change is correct and minimal. However, this fix appears to be incomplete as other generation handlers like OpenAIServingCompletion do not receive this flag, leading to inconsistent behavior. I've added a comment to suggest extending this fix to other relevant handlers for feature completeness.

reasoning_parser=args.reasoning_parser,
enable_prompt_tokens_details=args.enable_prompt_tokens_details,
enable_force_include_usage=args.enable_force_include_usage,
enable_log_outputs=args.enable_log_outputs,
Copy link
Contributor

Choose a reason for hiding this comment

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

high

This change correctly passes the enable_log_outputs flag to OpenAIServingChat. However, other handlers that produce generations, such as OpenAIServingCompletion (instantiated a few lines below), do not receive this flag. The --enable-log-outputs flag's description suggests it should apply to all generations. To ensure consistent behavior and feature completeness, OpenAIServingCompletion and other relevant handlers should also be updated to accept this flag and implement output logging.

reasoning_parser=args.reasoning_parser,
enable_prompt_tokens_details=args.enable_prompt_tokens_details,
enable_force_include_usage=args.enable_force_include_usage,
enable_log_outputs=args.enable_log_outputs,
Copy link
Member

Choose a reason for hiding this comment

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

Can you also pass this to OpenAIServingResponses?

Copy link

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors.

You ask your reviewers to trigger select CI tests on top of fastcheck CI.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

If you have any questions, please reach out to us on Slack at https://slack.vllm.ai.

🚀

Copy link
Member

@DarkLight1337 DarkLight1337 left a comment

Choose a reason for hiding this comment

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

Thanks for fixing!

@DarkLight1337 DarkLight1337 enabled auto-merge (squash) August 26, 2025 09:04
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Aug 26, 2025
@DarkLight1337 DarkLight1337 merged commit 384dd1b into vllm-project:main Aug 26, 2025
40 of 42 checks passed
tc-mb pushed a commit to tc-mb/vllm that referenced this pull request Aug 27, 2025
epwalsh pushed a commit to epwalsh/vllm that referenced this pull request Aug 28, 2025
xiao-llm pushed a commit to xiao-llm/vllm that referenced this pull request Aug 28, 2025
zhewenl pushed a commit to zhewenl/vllm that referenced this pull request Aug 28, 2025
@lordmathis lordmathis deleted the fix/enable-log-outputs branch August 31, 2025 20:22
zhewenl pushed a commit to zhewenl/vllm that referenced this pull request Sep 3, 2025
FeiDaLI pushed a commit to FeiDaLI/vllm that referenced this pull request Sep 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants