[Bugfix][FE]: Always include usage with --enable-force-include-usage (#20983)

Signed-off-by: Max Wittig <max.wittig@siemens.com>
Signed-off-by: Antoine Auger <antoineauger@users.noreply.github.com>
Co-authored-by: Antoine Auger <antoineauger@users.noreply.github.com>
This commit is contained in:
Max Wittig
2025-10-14 09:17:39 +02:00
committed by GitHub
co-authored by Antoine Auger
parent d32c611f45
commit fd85c9f426
11 changed files with 172 additions and 30 deletions
+8
View File
@@ -104,6 +104,13 @@ def make_arg_parser(parser: FlexibleArgumentParser):
default=False,
help="If set to True, enable prompt_tokens_details in usage.",
)
parser.add_argument(
"--enable-force-include-usage",
action="store_true",
default=False,
help="If set to True, include usage on every request "
"(even when stream_options is not specified)",
)
return parser
@@ -361,6 +368,7 @@ async def run_batch(
chat_template=None,
chat_template_content_format="auto",
enable_prompt_tokens_details=args.enable_prompt_tokens_details,
enable_force_include_usage=args.enable_force_include_usage,
)
if "generate" in supported_tasks
else None