[Misc] Remove tool name from warn logs (#59294)

Signed-off-by: Benjamin Merkel <benjamin.merkel@tngtech.com>
Co-authored-by: Benjamin Merkel <benjamin.merkel@tngtech.com>
Co-authored-by: Chauncey <chaunceyjiang@gmail.com>
This commit is contained in:
sfbemerk
2026-10-14 08:03:11 -07:00
committed by GitHub
co-authored by Benjamin Merkel Chauncey
parent efad400092
commit bf6c80c7e8
+2 -4
View File
@@ -720,10 +720,9 @@ def _postprocess_messages(messages: list[ConversationMessage]) -> None:
# leave the conversation unrecoverable. Coerce # leave the conversation unrecoverable. Coerce
# to an empty object so the turn can proceed. # to an empty object so the turn can proceed.
logger.warning( logger.warning(
"Tool call %r has arguments that are not valid " "Tool call has arguments that are not valid "
"JSON (%d chars); coercing to an empty object " "JSON (%d chars); coercing to an empty object "
"so the conversation can continue.", "so the conversation can continue.",
function.get("name"),
len(content), len(content),
) )
parsed = None parsed = None
@@ -736,9 +735,8 @@ def _postprocess_messages(messages: list[ConversationMessage]) -> None:
# "42", "true"). # "42", "true").
# Chat templates require a mapping. # Chat templates require a mapping.
logger.warning( logger.warning(
"Tool call %r arguments decoded to %s, not a " "Tool call arguments decoded to %s, not a "
"JSON object; coercing to an empty object.", "JSON object; coercing to an empty object.",
function.get("name"),
type(parsed).__name__, type(parsed).__name__,
) )
parsed = {} parsed = {}