fix(muse-glimmer): parse required/named tool calls natively (#34781)

Co-authored-by: Xinyuan Tong <xinyuantong.cs@gmail.com>
This commit is contained in:
Sidhartha Reddy Potu
2026-08-14 20:43:48 +00:00
committed by GitHub
co-authored by Xinyuan Tong
parent d7207be156
commit 42e8718d3d
@@ -251,6 +251,11 @@ class MuseGlimmerDetector(BaseFormatDetector):
def supports_structural_tag(self) -> bool:
return False
def parses_required_natively(self) -> bool:
"""The model only ever emits ATEM tool calls, so the JSON-array grammar
the default required/named path forces cannot parse its output."""
return True
def structure_info(self) -> _GetInfoFunc:
return lambda name: StructureInfo(
begin=f'{FUNCTION_CALLS_OPEN}\n{INVOKE_OPEN} name="{name}">',