fix(antigravity): update toolNode role from "tool" to "user" in chat completions

This commit is contained in:
Luis Pater
2025-12-07 02:37:46 +08:00
parent fd29ab418a
commit f383840cf9

View File

@@ -263,7 +263,7 @@ func ConvertOpenAIRequestToAntigravity(modelName string, inputRawJSON []byte, _
out, _ = sjson.SetRawBytes(out, "request.contents.-1", node)
// Append a single tool content combining name + response per function
toolNode := []byte(`{"role":"tool","parts":[]}`)
toolNode := []byte(`{"role":"user","parts":[]}`)
pp := 0
for _, fid := range fIDs {
if name, ok := tcID2Name[fid]; ok {