fix: fill a meaningful tool_index (#16504)

This commit is contained in:
Yingchun Lai
2026-01-07 12:00:09 +08:00
committed by GitHub
parent 951d16c890
commit 913b688f21

View File

@@ -83,7 +83,7 @@ class BaseFormatDetector(ABC):
results.append(
ToolCallItem(
tool_index=-1, # Caller should update this based on the actual tools array called
tool_index=tool_indices.get(name, -1),
name=name,
parameters=json.dumps(
act.get("parameters") or act.get("arguments", {}),