Skip to content

Commit 2cbb8c7

Browse files
committed
fix(translator): correct JSON path for item summary in response event
- Updated `response.output_item.done` to use `item.summary.0.text` instead of `item.summary.text`.
1 parent de280d9 commit 2cbb8c7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

internal/translator/openai/openai/responses/openai_openai-responses_response.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ func ConvertOpenAIChatCompletionsResponseToOpenAIResponses(ctx context.Context,
341341
outputItemDone, _ = sjson.SetBytes(outputItemDone, "sequence_number", nextSeq())
342342
outputItemDone, _ = sjson.SetBytes(outputItemDone, "item.id", st.ReasoningID)
343343
outputItemDone, _ = sjson.SetBytes(outputItemDone, "output_index", st.ReasoningIndex)
344-
outputItemDone, _ = sjson.SetBytes(outputItemDone, "item.summary.text", text)
344+
outputItemDone, _ = sjson.SetBytes(outputItemDone, "item.summary.0.text", text)
345345
out = append(out, emitRespEvent("response.output_item.done", outputItemDone))
346346

347347
st.Reasonings = append(st.Reasonings, oaiToResponsesStateReasoning{ReasoningID: st.ReasoningID, ReasoningData: text, OutputIndex: st.ReasoningIndex})

0 commit comments

Comments
 (0)