feat(translator): preserve text field in serialized output during chat completions processing

This commit is contained in:
Luis Pater
2026-01-16 11:35:34 +08:00
parent 526dd866ba
commit cec4e251bd

View File

@@ -209,6 +209,7 @@ func ConvertOpenAIRequestToAntigravity(modelName string, inputRawJSON []byte, _
for _, item := range content.Array() {
switch item.Get("type").String() {
case "text":
node, _ = sjson.SetBytes(node, "parts."+itoa(p)+".text", item.Get("text").String())
p++
case "image_url":
// If the assistant returned an inline data URL, preserve it for history fidelity.