[Frontend][Bugfix] Pass default_chat_template_kwargs to AnthropicServingMessages (#37899)

Signed-off-by: jetxa <jetxzhang@outlook.com>
This commit is contained in:
jetxa
2026-03-24 13:00:12 +08:00
committed by GitHub
parent 7281199a8c
commit 16a664df24
2 changed files with 3 additions and 0 deletions

View File

@@ -72,6 +72,7 @@ class AnthropicServingMessages(OpenAIServingChat):
tool_parser: str | None = None,
enable_prompt_tokens_details: bool = False,
enable_force_include_usage: bool = False,
default_chat_template_kwargs: dict[str, Any] | None = None,
):
super().__init__(
engine_client=engine_client,
@@ -87,6 +88,7 @@ class AnthropicServingMessages(OpenAIServingChat):
tool_parser=tool_parser,
enable_prompt_tokens_details=enable_prompt_tokens_details,
enable_force_include_usage=enable_force_include_usage,
default_chat_template_kwargs=default_chat_template_kwargs,
)
self.stop_reason_map = {
"stop": "end_turn",

View File

@@ -150,6 +150,7 @@ async def init_generate_state(
reasoning_parser=args.structured_outputs_config.reasoning_parser,
enable_prompt_tokens_details=args.enable_prompt_tokens_details,
enable_force_include_usage=args.enable_force_include_usage,
default_chat_template_kwargs=args.default_chat_template_kwargs,
)
if "generate" in supported_tasks
else None