Skip to content

Commit 2ade244

Browse files
Copilotsawka
andcommitted
Preserve non-map property values in schema cleaning
Fixed cleanSchemaForGemini to preserve property values that are not maps, ensuring the schema structure is maintained correctly. Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
1 parent 2401379 commit 2ade244

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

pkg/aiusechat/gemini/gemini-convertmessage.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ func cleanSchemaForGemini(schema map[string]any) map[string]any {
5353
for propName, propValue := range props {
5454
if propSchema, ok := propValue.(map[string]any); ok {
5555
cleanedProps[propName] = cleanSchemaForGemini(propSchema)
56+
} else {
57+
// Preserve non-map property values
58+
cleanedProps[propName] = propValue
5659
}
5760
}
5861
cleaned[key] = cleanedProps

0 commit comments

Comments
 (0)