fix(translators): correct key path for system_instruction.parts in Claude request logic

This commit is contained in:
Luis Pater committed 2025-12-29 11:54:26 +08:00
1 parent f137eb0ac4
commit d8fc485513
1 file changed
+1 -1
@@ -56,7 +56,7 @@ func ConvertClaudeRequestToGemini(modelName string, inputRawJSON []byte, _ bool)
out, _ = sjson.SetRaw(out, "system_instruction", systemInstruction)
}
} else if systemResult.Type == gjson.String {
out, _ = sjson.Set(out, "request.system_instruction.parts.-1.text", systemResult.String())
out, _ = sjson.Set(out, "system_instruction.parts.-1.text", systemResult.String())
}
// contents