Skip to main content
The OpenAI Responses provider exposes a file search tool that allows you to search through files and vector stores hosted by OpenAI. The file search tool can be enabled via the chatModelOptions parameter of the Agent constructor.
When fileSearchConfig.vectorStoreIds is supplied, the provider restricts searches to those stores. You can also omit the list and rely on the provider’s defaults.

Streaming Events

Results stream under the file_search metadata key:
Typical fields include query, document, score, and provider-specific metadata that you can surface in your UI.

Vector Store Bootstrap

The OpenAI Responses example repo includes a helper that uploads wiki docs and creates a reusable vector store:
See the sample below for the full workflow, including caching the vector store ID on disk so you do not re-upload files every run.

Example