Normalizes raw response tool calls into ChatToolCalls with PARSED arguments.
A model can emit malformed JSON for its arguments. That is a tool-specific failure the caller
must be able to see, so the call is surfaced with empty arguments and a warning rather than
dropped — dropping it would look to an agent loop like the model said nothing at all.
Normalizes raw response tool calls into ChatToolCalls with PARSED arguments.
A model can emit malformed JSON for its arguments. That is a tool-specific failure the caller must be able to see, so the call is surfaced with empty arguments and a warning rather than dropped — dropping it would look to an agent loop like the model said nothing at all.