OpenAIResponsesChatGenerator discards annotations
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!
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.