The OpenAI gpt-4o-search-preview model doesn't seem to return web search annotations in streaming mode.

This is currently reproducible in OpenAiChatModelIT#streamWebSearchAnnotationsTest

Comment From: PratikDey

Hi @ilayaperumalg , is it ok if I work on this bug? Can you tell me some more on where I need to start checking for debugging purpose

Comment From: ilayaperumalg

@PratikDey sure, thanks for your interest.

When I debugged this issue, I noticed that the OpenAI module gpt-4o-search-preview doesn't even respond with web search annotations when using streaming operation. Hence, this has got nothing to do with Spring AI side of code. Switching to use the model gpt-4o-mini-search-preview fixed the issue but this model doesn't consistently include web search annotations as well.