External Publication
Visit Post

Including citations from both file_search tool and web_search tool in the same response

OpenAI Developer Community April 18, 2026
Source

Hi, I’m trying to fix an issue in a RAG system with file_search that also uses web_search tool restricted to a set of allowed domains (using responses api).

The problem I’m facing is the following: when only one tool returns results, I can correctly parse the output and insert annotations. However, when both tools return results, I start seeing text truncation in the middle of sentences.

Has anyone encountered this before or can share examples of how to handle this situation correctly?

Discussion in the ATmosphere

Loading comments...