Replies: 1 comment
|
Official Responses encoding (this is what the current code does, and OpenAI documents it): pi/packages/ai/src/api/openai-responses-shared.ts Lines 77 to 104 in 71dca87 pi/packages/ai/src/api/openai-responses-shared.ts Lines 296 to 311 in 71dca87
Completions has to lift because Chat Completions pi/packages/ai/src/api/openai-completions.ts Lines 1376 to 1444 in 71dca87 Ask: keep the array form for OpenAI. For compatible gateways that stringify
That is still valid Responses input (call pairing stays intact; user |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Current
openai-responsesconversion puts tool-result images infunction_call_output.outputasinput_image. That is the official Responses encoding (outputisstring | (input_text | input_image | input_file)[]). Completions lifts to a user message only becauserole: "tool"is string-only.OpenAI accepts the array form. Compatible
openai-responsesgateways treatfunction_call_outputas a string and drop the images. The model only sees leftover text. Same endpoint acceptsinput_imageon a user message.Ask: keep the official array form for OpenAI. Fall back to the completions lift (string output + following user
input_image) for gateways that cannot take image parts in tool output. Do not always lift.File:
packages/ai/src/api/openai-responses-shared.ts. Issue: #9518All reactions