{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreif6o5k636raxbryfep5zsd36ctoak5mzw3nnfgfs6izye4aw2kryu",
"uri": "at://did:plc:lk3jfj3zq4k4wxnk474axylu/app.bsky.feed.post/3mjttzysxs5u2"
},
"path": "/t/including-citations-from-both-file-search-tool-and-web-search-tool-in-the-same-response/1379247#post_3",
"publishedAt": "2026-04-19T10:13:28.000Z",
"site": "https://community.openai.com",
"tags": [
"@RobertoZanolli",
"openai",
"platform"
],
"textContent": "Welcome in the Dev’s Community @RobertoZanolli\n\nMy read: the real problem may not be file_search or web_search themselves, but how the combined Responses API output is being flattened / rendered after both tool results are returned.\n\nOpenAI’s structure is tool-based:\n\nPlease see the infos on the openai platform\n\nweb_search returns a web_search_call plus a message item, with visible text in message.content[0].text and citations in message.content[0].annotations.\n\nfile_search is also returned as its own file_search_call, and if you want the actual matched file results, OpenAI recommends include=[“file_search_call.results”].\n\nThe Responses API is designed around multiple typed output[] items, not one single text blob.\n\nSo my question would be:\n\nCould the real issue be that when both tools fire, the app / SDK / dashboard log renderer is merging multiple output[] items incorrectly, which then causes mid-sentence truncation or malformed inline citation injection?\n\nThat would explain why:\n\neach tool works fine alone,\n\nbut mixed tool output breaks only when both are present.\n\nIf so, the likely failure point is one of these:\n\nparsing the combined output[] structure as plain text too early,\n\nmerging annotations and file results into one rendered sentence incorrectly,\n\na dashboard/log-view serialization issue rather than raw API corruption.\n\nI’d verify this by comparing:\n\nthe raw JSON response,\n\nthe SDK-parsed object,\n\nand the dashboard/log rendering.\n\nIf the raw JSON is clean but the rendered text is broken, then it’s almost certainly a post-processing / rendering-layer issue, not a retrieval issue.\n\nThat’s where I would focus first.\n\nIn the Community are many better and qualified partners for your problem, and you can become more support.\n\nBest",
"title": "Including citations from both file_search tool and web_search tool in the same response"
}