@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 4a9c07a0a2
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 7, 17:45 UTC

[BugFix] anthropic/serving_messages: fix tool call arguments streaming (#34887)

Signed-off-by: Daniele Trifirò <dtrifiro@redhat.com> Co-authored-by: Nicolò Lucchesi <nlucches@redhat.com>

Daniele committed Feb 26, 2026 at 06:39 UTC 4a9c07a0a2b8308a045476b48be29e37c349274b
1 file changed +13
vllm/entrypoints/anthropic/serving.py
+13
@@ -432,6 +432,19 @@ class AnthropicServingMessages(OpenAIServingChat):
432 data = chunk.model_dump_json(exclude_unset=True)
433 yield wrap_data_with_event(data, "content_block_start")
434 content_block_started = True
435 + if tool_call.function and tool_call.function.arguments:
436 + chunk = AnthropicStreamEvent(
437 + index=content_block_index,
438 + type="content_block_delta",
439 + delta=AnthropicDelta(
440 + type="input_json_delta",
441 + partial_json=tool_call.function.arguments,
442 + ),
443 + )
444 + data = chunk.model_dump_json(exclude_unset=True)
445 + yield wrap_data_with_event(
446 + data, "content_block_delta"
447 + )
448
449 else:
450 chunk = AnthropicStreamEvent(