From db723d245a2ed029c9fdb21e8c51a57fd4980f8a Mon Sep 17 00:00:00 2001 From: Cenab Batu Bora <40250311+cenab@users.noreply.github.com> Date: Thu, 10 Sep 2026 09:07:42 -0600 Subject: [PATCH] [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 --- vllm/entrypoints/cli/openai.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vllm/entrypoints/cli/openai.py b/vllm/entrypoints/cli/openai.py index c9869077c0..fa01ff534b 100644 --- a/vllm/entrypoints/cli/openai.py +++ b/vllm/entrypoints/cli/openai.py @@ -171,7 +171,7 @@ class ChatCommand(CLISubcommand): if stats: create_kwargs["stream_options"] = {"include_usage": True} - if args.quick: + if args.quick is not None: conversation.append({"role": "user", "content": args.quick}) stream = client.chat.completions.create( @@ -248,12 +248,12 @@ class CompleteCommand(CLISubcommand): "model": model_name, "stream": True, } - if args.max_tokens: + if args.max_tokens is not None: kwargs["max_tokens"] = args.max_tokens if stats: kwargs["stream_options"] = {"include_usage": True} - if args.quick: + if args.quick is not None: stream = client.completions.create(prompt=args.quick, **kwargs) _print_completion_stream(stream, stats) return