fix: strip uniqueItems from Gemini function_declarations (#2123)

Gemini API rejects uniqueItems in tool schemas with 400. Add it to
unsupportedConstraints alongside minItems/maxItems where it belongs.

Same class of fix as #1424 and #1531.
This commit is contained in:
Muran-prog
2026-03-14 21:18:06 +02:00
parent 67669196ed
commit f6bbca35ab

View File

@@ -236,7 +236,7 @@ func addAdditionalPropertiesHints(jsonStr string) string {
var unsupportedConstraints = []string{
"minLength", "maxLength", "exclusiveMinimum", "exclusiveMaximum",
"pattern", "minItems", "maxItems", "format",
"pattern", "minItems", "maxItems", "uniqueItems", "format",
"default", "examples", // Claude rejects these in VALIDATED mode
}