fix(translators): update role from tool to user in Gemini and Gemini-CLI requests

This commit is contained in:
Luis Pater
2025-12-24 04:24:07 +08:00
parent f413feec61
commit 66769ec657
2 changed files with 2 additions and 2 deletions

View File

@@ -244,7 +244,7 @@ func ConvertOpenAIRequestToGeminiCLI(modelName string, inputRawJSON []byte, _ bo
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 {