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:
@@ -236,7 +236,7 @@ func addAdditionalPropertiesHints(jsonStr string) string {
|
|||||||
|
|
||||||
var unsupportedConstraints = []string{
|
var unsupportedConstraints = []string{
|
||||||
"minLength", "maxLength", "exclusiveMinimum", "exclusiveMaximum",
|
"minLength", "maxLength", "exclusiveMinimum", "exclusiveMaximum",
|
||||||
"pattern", "minItems", "maxItems", "format",
|
"pattern", "minItems", "maxItems", "uniqueItems", "format",
|
||||||
"default", "examples", // Claude rejects these in VALIDATED mode
|
"default", "examples", // Claude rejects these in VALIDATED mode
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user