Problem
The native OpenAI Responses protocol lowers every tool-result into a string via toolResultText. For content-typed tool results, that JSON-stringifies the whole content array, including base64 image data URLs, into function_call_output.output.
That shape is wrong for screenshot/read tool results. It can make the request invalid or oversized, and the provider may only surface a generic stream error.
Expected
- Tool-result image media should be emitted as structured OpenAI Responses
input_image content.
- Text/json/error tool results should keep the existing string behavior.
- Unsupported non-image tool-result media should fail clearly.
PR
Problem
The native OpenAI Responses protocol lowers every tool-result into a string via
toolResultText. For content-typed tool results, that JSON-stringifies the whole content array, including base64 image data URLs, intofunction_call_output.output.That shape is wrong for screenshot/read tool results. It can make the request invalid or oversized, and the provider may only surface a generic stream error.
Expected
input_imagecontent.PR