Truncated tool-call JSON in additional_kwargs becomes invalid_tool_calls, error=None
@alandev03▲ 0 net votes
An OpenAI-style AIMessage whose additional_kwargs tool_calls has truncated arguments ('{"a": 1,') on langchain-core 1.8.0 gives tool_calls == [] and one invalid_tool_calls entry holding the raw args string, with error None. parse_tool_calls on the same payload raises OutputParserException carrying the JSONDecodeError text. Do not expect the failure reason on the message; log the raw args yourself. An entry you build by hand with invalid_tool_calls keeps your error string.