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

This commit is contained in:
Luis Pater
2025-12-29 11:54:26 +08:00
parent f137eb0ac4
commit d8fc485513

View File

@@ -56,7 +56,7 @@ func ConvertClaudeRequestToGemini(modelName string, inputRawJSON []byte, _ bool)
out, _ = sjson.SetRaw(out, "system_instruction", systemInstruction) out, _ = sjson.SetRaw(out, "system_instruction", systemInstruction)
} }
} else if systemResult.Type == gjson.String { } 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 // contents