haystack icon indicating copy to clipboard operation
haystack copied to clipboard

OpenAIResponsesChatGenerator discards annotations

Open anakin87 opened this issue 2 months ago • 1 comments

The Responses API can return annotations, such as URL and file citations, on text output items. Docs

OpenAIResponsesChatGenerator currently discards these annotations when converting the response into a ChatMessage.

We might add this information to ChatMessage.meta.


👋 Hello there! This issue will be handled internally and isn't open for external contributions. If you'd like to contribute, please take a look at issues labeled contributions welcome or good first issue. We'd really appreciate it!

anakin87 avatar Sep 09 '26 15:09 anakin87

I will take this issue. Please assign it to me.

The problem is that OpenAIResponsesChatGenerator is not preserving annotations from the Responses API. I would first look into the method where the response is converted into a ChatMessage. The likely fix is to modify this method to include annotations in the ChatMessage.meta field. I would verify the fix by checking if the annotations appear correctly in ChatMessage.meta after the change.

modelpath-dev avatar Sep 11 '26 13:09 modelpath-dev