Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@ public static String validateInput(String input, Map<String, Object> schema) {
return null; // No schema, validation passes
}

// Defensive: treat null/blank input as empty JSON object so that
// networknt-schema does not throw NPE ("argument 'content' is null")
// when a ToolUseBlock carries parsed arguments but no raw content string.
if (input == null || input.isBlank()) {
input = "{}";
}

try {
// Convert schema to JSON string
String schemaJson = JsonUtils.getJsonCodec().toJson(schema);
Expand Down
Loading