From e8aa2d0d6d5de8a0f90387ac234a0c92423c8bf9 Mon Sep 17 00:00:00 2001 From: Erica Pisani Date: Wed, 8 Apr 2026 14:17:03 -0400 Subject: [PATCH] fix: Support 'args' key in response tool call argument extraction Some frameworks (e.g. LangGraph Python) return tool calls with an 'args' key instead of 'arguments'. Add 'args' as a fallback in checkResponseToolCalls so these tool calls are validated correctly. Refs PY-2281 Co-Authored-By: Claude Opus 4.6 (1M context) --- src/test-cases/checks.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/test-cases/checks.ts b/src/test-cases/checks.ts index 31a835d..b360498 100644 --- a/src/test-cases/checks.ts +++ b/src/test-cases/checks.ts @@ -875,6 +875,7 @@ export function checkResponseToolCalls( let actualArgs: Record; const argsRaw = foundCall.arguments || + foundCall.args || (foundCall.function as Record)?.arguments; if (typeof argsRaw === "string") {