fix(ai): render tool-call arguments as compact JSON in logs

Switch the "Agentic tool call" log from {:?} (Debug) to {} (Display) on
serde_json::Value. Display produces compact JSON — `{"date":"2023-08-15"}`
instead of `Object {"date": String("2023-08-15")}` — which is what the
model actually sent and what a human reading the log wants to see.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Cameron
2026-04-24 14:25:53 -04:00
parent d43f5fc991
commit e5781325c6

View File

@@ -3281,7 +3281,7 @@ Return ONLY the summary, nothing else."#,
{ {
for tool_call in tool_calls { for tool_call in tool_calls {
log::info!( log::info!(
"Agentic tool call [{}]: {} {:?}", "Agentic tool call [{}]: {} {}",
iteration, iteration,
tool_call.function.name, tool_call.function.name,
tool_call.function.arguments tool_call.function.arguments