fix: 移除 Gemini 不支持的 patternProperties 字段 #795

This commit is contained in:
IanShaw027
2026-03-15 17:44:44 +08:00
parent 19d3ecc76f
commit 90b3838173

View File

@@ -3235,7 +3235,7 @@ func cleanToolSchema(schema any) any {
for key, value := range v {
// 跳过不支持的字段
if key == "$schema" || key == "$id" || key == "$ref" ||
key == "additionalProperties" || key == "minLength" ||
key == "additionalProperties" || key == "patternProperties" || key == "minLength" ||
key == "maxLength" || key == "minItems" || key == "maxItems" {
continue
}