@@ -1005,7 +1005,7 @@ func handleBackgroundNonStream(ctx context.Context, store *ResponseStore, respon
10051005 toolResult = fmt .Sprintf ("Error: %v" , toolErr )
10061006 }
10071007 openAIReq .Messages = append (openAIReq .Messages , schema.Message {
1008- Role : "tool" , Content : toolResult , ToolCallID : tc .ID , Name : tc .FunctionCall .Name ,
1008+ Role : "tool" , Content : toolResult , StringContent : toolResult , ToolCallID : tc .ID , Name : tc .FunctionCall .Name ,
10091009 })
10101010 allOutputItems = append (allOutputItems , schema.ORItemField {
10111011 Type : "function_call_output" , ID : fmt .Sprintf ("fco_%s" , uuid .New ().String ()),
@@ -1290,7 +1290,7 @@ func handleBackgroundStream(ctx context.Context, store *ResponseStore, responseI
12901290 toolResult = fmt .Sprintf ("Error: %v" , toolErr )
12911291 }
12921292 openAIReq .Messages = append (openAIReq .Messages , schema.Message {
1293- Role : "tool" , Content : toolResult , ToolCallID : tc .ID , Name : tc .FunctionCall .Name ,
1293+ Role : "tool" , Content : toolResult , StringContent : toolResult , ToolCallID : tc .ID , Name : tc .FunctionCall .Name ,
12941294 })
12951295
12961296 outputIndex ++
@@ -1547,7 +1547,7 @@ func handleOpenResponsesNonStream(c echo.Context, responseID string, createdAt i
15471547 toolResult = fmt .Sprintf ("Error: %v" , toolErr )
15481548 }
15491549 openAIReq .Messages = append (openAIReq .Messages , schema.Message {
1550- Role : "tool" , Content : toolResult , ToolCallID : tc .ID , Name : tc .FunctionCall .Name ,
1550+ Role : "tool" , Content : toolResult , StringContent : toolResult , ToolCallID : tc .ID , Name : tc .FunctionCall .Name ,
15511551 })
15521552
15531553 // Collect function_call + function_call_output items for the response
@@ -2241,7 +2241,7 @@ func handleOpenResponsesStream(c echo.Context, responseID string, createdAt int6
22412241 toolResult = fmt .Sprintf ("Error: %v" , toolErr )
22422242 }
22432243 openAIReq .Messages = append (openAIReq .Messages , schema.Message {
2244- Role : "tool" , Content : toolResult , ToolCallID : tcID , Name : tc .Name ,
2244+ Role : "tool" , Content : toolResult , StringContent : toolResult , ToolCallID : tcID , Name : tc .Name ,
22452245 })
22462246
22472247 // Emit function_call_output item
0 commit comments