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 fixes a startup crash introduced when vLLM v0.17+ removed
--disable-log-requestsfrom its argument parser, while model-engine still unconditionally passes the flag (e.g. fromllm_model_endpoint_use_cases.pywhensensitive_log_modeis set, and invllm_batch.py). The fix adds a guard inparse_argsthat injects a no-op argument definition only when vLLM has not already registered the flag — preserving forward compatibility on older vLLM versions while preventingunrecognized argumentserrors on 0.17+.parser._actions(a privateargparseattribute) for the existence check;parser._option_string_actionswould be a more direct and equally idiomatic alternative.--disable-log-requests", but the current model-engine codebase still passes this flag unconditionally (e.g.llm_model_endpoint_use_cases.py:997,vllm_batch.py:179), so the wording is mildly misleading about the longevity of this shim.0.17.0-rc1.Confidence Score: 4/5
parser._actionsattribute instead of the more directparser._option_string_actions, which is a style nit rather than a correctness issue. Thesensitive_log_modebehavioral regression (noted in a previous review thread) is the more substantive open question but is pre-existing and outside the scope of this fix.sensitive_log_modebehavioral gap.Important Files Changed
--disable-log-requestsas a no-op when vLLM 0.17+ has removed the flag from its parser; uses privateparser._actionsfor the existence check.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[vllm_server.py starts] --> B[FlexibleArgumentParser created] B --> C[make_arg_parser populates parser\nwith vLLM's known flags] C --> D{Is --disable-log-requests\nalready in parser._actions?} D -- Yes\nvLLM < 0.17 → vLLM handles it natively --> E[Skip — no-op shim not needed] D -- No\nvLLM 0.17+ removed the flag --> F[Add --disable-log-requests\nas no-op argument] E --> G[parser.parse_args\naccepts --disable-log-requests] F --> G G --> H[vllm_server launches successfully] I[llm_model_endpoint_use_cases.py\nif sensitive_log_mode:\n vllm_args.disable_log_requests = True] -->|passes --disable-log-requests\nat runtime| APrompt To Fix All With AI
Last reviewed commit: "Merge branch 'main' ..."
Context used:
Learnt From
scaleapi/scaleapi#126958