[Bugfix][Tool Parser] Migrate Granite to the streaming Parser Engine (#49648)

Signed-off-by: Nikhil Kulkarni <nikhilkulkarni1755@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Chauncey <chaunceyjiang@gmail.com>
This commit is contained in:
Nikhil Kulkarni
2026-09-23 10:37:40 +00:00
committed by GitHub
co-authored by Claude Opus 4.8 Chauncey
parent c961121519
commit 15ed1262e7
14 changed files with 631 additions and 369 deletions
+5
View File
@@ -78,6 +78,11 @@ def _discover_parsers() -> list[_ParserInfo]:
# Inkling opts out of token-id terminal matching and has typed
# structural blocks; its replay coverage lives in test_inkling.py.
continue
if cfg.name == "granite":
# Granite has a JSON-array tool body with no TOOL_END terminal, so
# it does not fit this token-terminal harness; its replay coverage
# lives in test_granite.py.
continue
tool_end = cfg.token_id_terminals.get("TOOL_END")
if not tool_end:
raise RuntimeError(