chore(core): add note about backward compatibility for tool_calls in additional_kwargs in JsonOutputKeyToolsParser

This commit is contained in:
Mason Daugherty
2025-08-25 10:30:41 -04:00
parent 622337a297
commit 1c55536ec1

View File

@@ -246,6 +246,8 @@ class JsonOutputKeyToolsParser(JsonOutputToolsParser):
_ = tool_call.pop("id")
else:
try:
# This exists purely for backward compatibility / cached messages
# All new messages should use `message.tool_calls`
raw_tool_calls = copy.deepcopy(message.additional_kwargs["tool_calls"])
except KeyError:
if self.first_tool_only: