mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-06-01 04:12:28 +08:00
fix: log gemini cli schema cleanup errors
This commit is contained in:
@@ -889,7 +889,12 @@ func cleanGeminiCLIRequestSchemas(body []byte) []byte {
|
||||
}
|
||||
cleaned := util.CleanJSONSchemaForGemini(params.Raw)
|
||||
path := fmt.Sprintf("request.tools.%d.%s.%d.%s", i, declarationsKey, j, schemaKey)
|
||||
body, _ = sjson.SetRawBytes(body, path, []byte(cleaned))
|
||||
updated, errSet := sjson.SetRawBytes(body, path, []byte(cleaned))
|
||||
if errSet != nil {
|
||||
log.Errorf("gemini cli executor: failed to set cleaned schema at %s: %v", path, errSet)
|
||||
continue
|
||||
}
|
||||
body = updated
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -905,7 +910,12 @@ func cleanGeminiCLIRequestSchemas(body []byte) []byte {
|
||||
continue
|
||||
}
|
||||
cleaned := util.CleanJSONSchemaForGemini(responseSchema.Raw)
|
||||
body, _ = sjson.SetRawBytes(body, schemaPath, []byte(cleaned))
|
||||
updated, errSet := sjson.SetRawBytes(body, schemaPath, []byte(cleaned))
|
||||
if errSet != nil {
|
||||
log.Errorf("gemini cli executor: failed to set cleaned response schema at %s: %v", schemaPath, errSet)
|
||||
continue
|
||||
}
|
||||
body = updated
|
||||
}
|
||||
|
||||
return body
|
||||
|
||||
Reference in New Issue
Block a user