[Bugfix] Honor explicit empty and zero CLI arguments (#55710)
Signed-off-by: Cenab Batu Bora <40250311+cenab@users.noreply.github.com> Co-authored-by: Codex <noreply@openai.com>
Cenab Batu Bora committed
Sep 10, 2026 at 09:07 UTC
db723d245a2ed029c9fdb21e8c51a57fd4980f8a
1 file changed
+3
-3
vllm/entrypoints/cli/openai.py
+3
-3
@@ -171,7 +171,7 @@ class ChatCommand(CLISubcommand):
171
if stats:
172
create_kwargs["stream_options"] = {"include_usage": True}
173
174
- if args.quick:
174
+ if args.quick is not None:
175
conversation.append({"role": "user", "content": args.quick})
176
177
stream = client.chat.completions.create(
@@ -248,12 +248,12 @@ class CompleteCommand(CLISubcommand):
248
"model": model_name,
249
"stream": True,
250
}
251
- if args.max_tokens:
251
+ if args.max_tokens is not None:
252
kwargs["max_tokens"] = args.max_tokens
253
if stats:
254
kwargs["stream_options"] = {"include_usage": True}
255
256
- if args.quick:
256
+ if args.quick is not None:
257
stream = client.completions.create(prompt=args.quick, **kwargs)
258
_print_completion_stream(stream, stats)
259
return