[Bugfix] [Parser] Fix empty tool block silently dropping subsequent content (#46091)

Signed-off-by: Ben Browning <bbrownin@redhat.com>
Co-authored-by: Flora Feng <4florafeng@gmail.com>
This commit is contained in:
Ben Browning
2026-06-18 23:17:18 +00:00
committed by GitHub
co-authored by Flora Feng
parent c3c6d723fd
commit 7f616c327d
4 changed files with 26 additions and 3 deletions
+4
View File
@@ -375,6 +375,10 @@ def gemma4_config() -> ParserEngineConfig:
ParserState.TOOL_PREAMBLE,
(EventType.REASONING_END, EventType.TOOL_CALL_START),
),
(ParserState.TOOL_PREAMBLE, "TOOL_END"): Transition(
ParserState.CONTENT,
(EventType.TOOL_CALL_END,),
),
(ParserState.TOOL_PREAMBLE, "CALL_PREFIX"): Transition(
ParserState.TOOL_NAME,
(),