Skip to content

Commit e8aa2d0

Browse files
ericapisaniclaude
andcommitted
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) <noreply@anthropic.com>
1 parent 74206d0 commit e8aa2d0

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/test-cases/checks.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -875,6 +875,7 @@ export function checkResponseToolCalls(
875875
let actualArgs: Record<string, unknown>;
876876
const argsRaw =
877877
foundCall.arguments ||
878+
foundCall.args ||
878879
(foundCall.function as Record<string, unknown>)?.arguments;
879880

880881
if (typeof argsRaw === "string") {

0 commit comments

Comments
 (0)