fix(vllm): accept --disable-log-requests as no-op for vLLM 0.17+ compat#783
Open
fix(vllm): accept --disable-log-requests as no-op for vLLM 0.17+ compat#783
Conversation
…d compat vLLM 0.17.0 removed --disable-log-requests from its arg parser, but model-engine hardcodes this flag when launching vllm_server. Accept the flag as a no-op when it's not present in the vLLM parser to avoid startup failures with newer vLLM images. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Comment on lines
+26
to
+36
| # Backward compatibility: older model-engine versions pass --disable-log-requests | ||
| # which was removed from vLLM's arg parser in v0.17+. Accept it as a no-op. | ||
| if not any( | ||
| "--disable-log-requests" in getattr(a, "option_strings", []) for a in parser._actions | ||
| ): | ||
| parser.add_argument( | ||
| "--disable-log-requests", | ||
| action="store_true", | ||
| default=False, | ||
| help="(deprecated, no-op) Kept for backward compatibility with older model-engine versions.", | ||
| ) |
There was a problem hiding this comment.
Silent no-op may break
sensitive_log_mode compliance guarantees
The comment says "older model-engine versions pass --disable-log-requests", but the current model-engine code (llm_model_endpoint_use_cases.py:996-997) still hardcodes this flag whenever hmi_config.sensitive_log_mode is True:
if hmi_config.sensitive_log_mode:
vllm_args.disable_log_requests = TrueBy silently accepting --disable-log-requests as a no-op in vLLM 0.17+, request logging will not be disabled for endpoints that have sensitive_log_mode set. If sensitive_log_mode is used for privacy or compliance reasons, this silent behavioral regression could expose request-level logs that were previously suppressed.
It would be worth either:
- Confirming that vLLM 0.17+ disables request logging by default (or via a different mechanism) and documenting that here, or
- Identifying the replacement mechanism in vLLM 0.17+ (e.g., a new flag or
VLLM_CONFIGURE_LOGGINGenv var) and wiringsensitive_log_modethrough that path alongside this no-op shim.
Prompt To Fix With AI
This is a comment left during a code review.
Path: model-engine/model_engine_server/inference/vllm/vllm_server.py
Line: 26-36
Comment:
**Silent no-op may break `sensitive_log_mode` compliance guarantees**
The comment says "older model-engine versions pass `--disable-log-requests`", but the *current* model-engine code (`llm_model_endpoint_use_cases.py:996-997`) still hardcodes this flag whenever `hmi_config.sensitive_log_mode` is `True`:
```python
if hmi_config.sensitive_log_mode:
vllm_args.disable_log_requests = True
```
By silently accepting `--disable-log-requests` as a no-op in vLLM 0.17+, request logging will **not** be disabled for endpoints that have `sensitive_log_mode` set. If `sensitive_log_mode` is used for privacy or compliance reasons, this silent behavioral regression could expose request-level logs that were previously suppressed.
It would be worth either:
1. Confirming that vLLM 0.17+ disables request logging by default (or via a different mechanism) and documenting that here, or
2. Identifying the replacement mechanism in vLLM 0.17+ (e.g., a new flag or `VLLM_CONFIGURE_LOGGING` env var) and wiring `sensitive_log_mode` through that path alongside this no-op shim.
How can I resolve this? If you propose a fix, please make it concise.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--disable-log-requestswas removed from vLLM's arg parser in v0.17+unrecognized arguments: --disable-log-requestsTest plan
qwen3-5-27bandqwen3-5-0-8bendpoints with vLLM0.17.0-rc1image — both confirmed3/3 Running🤖 Generated with Claude Code
Greptile Summary
This PR adds a backward-compatibility shim in
vllm_server.pyso that the--disable-log-requestsCLI flag (hardcoded by model-engine whensensitive_log_modeis enabled) is silently accepted rather than causing anunrecognized argumentsstartup failure in vLLM 0.17+, where the flag was removed from the arg parser.Key points:
parser._actionsto check whether--disable-log-requestsis already registered before adding a no-op handler, so pre-0.17 behavior is fully preserved.--disable-log-requestsis not merely a legacy artifact — it is still emitted by the currentllm_model_endpoint_use_cases.pywheneverhmi_config.sensitive_log_modeisTrue. With this shim in place, vLLM 0.17+ will silently ignore the flag, meaning request logging will not be suppressed forsensitive_log_modeendpoints. If this mode carries privacy or compliance expectations, this is a behavioral regression that should be explicitly acknowledged and tracked.Confidence Score: 3/5
sensitive_log_modeendpoints on vLLM 0.17+.sensitive_log_mode→--disable-log-requests) into a no-op for vLLM 0.17+ without documenting an alternative or confirming vLLM 0.17+ still suppresses request logs through another mechanism. This warrants attention before merging in compliance-sensitive environments.sensitive_log_modeinllm_model_endpoint_use_cases.pyshould be explicitly addressed.Important Files Changed
--disable-log-requestsremoved in vLLM 0.17+. The approach is technically sound but silently disables the behavior ofsensitive_log_mode(which relies on this flag to suppress request logs) without a documented replacement path.Sequence Diagram
sequenceDiagram participant ME as model-engine<br/>(llm_model_endpoint_use_cases.py) participant SH as Shell participant VS as vllm_server.py participant PA as FlexibleArgumentParser ME->>SH: python -m vllm_server ... --disable-log-requests note over ME: sensitive_log_mode=True<br/>→ disable_log_requests=True<br/>→ appends --disable-log-requests to cmd SH->>VS: launch with --disable-log-requests in sys.argv VS->>PA: make_arg_parser(parser) note over PA: vLLM < 0.17: --disable-log-requests registered<br/>vLLM ≥ 0.17: flag NOT registered VS->>PA: check parser._actions for --disable-log-requests alt vLLM < 0.17 (flag already exists) PA-->>VS: flag found → skip add_argument PA->>PA: parse_args() — flag works as intended else vLLM ≥ 0.17 (flag missing) VS->>PA: add_argument("--disable-log-requests", no-op) PA->>PA: parse_args() — flag accepted but ignored note over PA: ⚠️ request logs NOT suppressed endPrompt To Fix All With AI
Last reviewed commit: "fix(vllm): add --dis..."
Context used:
Learnt From
scaleapi/scaleapi#126958