fix(codex): include content field in reasoning item initialization
This commit is contained in:
@@ -131,7 +131,7 @@ func ConvertClaudeRequestToCodex(modelName string, inputRawJSON []byte, _ bool)
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
reasoningItem := []byte(`{"type":"reasoning","summary":[]}`)
|
reasoningItem := []byte(`{"type":"reasoning","summary":[],"content":null}`)
|
||||||
if signature != "" {
|
if signature != "" {
|
||||||
reasoningItem, _ = sjson.SetBytes(reasoningItem, "encrypted_content", signature)
|
reasoningItem, _ = sjson.SetBytes(reasoningItem, "encrypted_content", signature)
|
||||||
}
|
}
|
||||||
@@ -140,7 +140,6 @@ func ConvertClaudeRequestToCodex(modelName string, inputRawJSON []byte, _ bool)
|
|||||||
summary, _ = sjson.SetBytes(summary, "text", thinkingText)
|
summary, _ = sjson.SetBytes(summary, "text", thinkingText)
|
||||||
reasoningItem, _ = sjson.SetRawBytes(reasoningItem, "summary.-1", summary)
|
reasoningItem, _ = sjson.SetRawBytes(reasoningItem, "summary.-1", summary)
|
||||||
}
|
}
|
||||||
|
|
||||||
template, _ = sjson.SetRawBytes(template, "input.-1", reasoningItem)
|
template, _ = sjson.SetRawBytes(template, "input.-1", reasoningItem)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user