Skip to content

Commit 6acbd76

Browse files
committed
docs: address PR feedback for FileSearchTool documentation
- Add links to OpenAI and Gemini file upload docs - Remove beta status note for Gemini File Search API - Remove redundant Configuration section - Update Google docs to use 'file search stores' instead of 'file resource names' for consistency with OpenAI
1 parent d8ef07d commit 6acbd76

File tree

1 file changed

+3
-31
lines changed

1 file changed

+3
-31
lines changed

docs/builtin-tools.md

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ The [`FileSearchTool`][pydantic_ai.builtin_tools.FileSearchTool] enables your ag
590590

591591
#### OpenAI Responses
592592

593-
With OpenAI, you need to first upload files to a vector store, then reference the vector store IDs when using the `FileSearchTool`:
593+
With OpenAI, you need to first [upload files to a vector store](https://platform.openai.com/docs/assistants/tools/file-search), then reference the vector store IDs when using the `FileSearchTool`:
594594

595595
```py {title="file_search_openai.py" test="skip"}
596596
from pydantic_ai import Agent, FileSearchTool
@@ -609,7 +609,7 @@ print(result.output)
609609

610610
#### Google (Gemini)
611611

612-
With Gemini, you need to first upload files via the Files API, then reference the file resource names:
612+
With Gemini, you need to first [create a file search store via the Files API](https://ai.google.dev/gemini-api/docs/files), then reference the file search store names:
613613

614614
```py {title="file_search_google.py" test="skip"}
615615
from pydantic_ai import Agent, FileSearchTool
@@ -624,35 +624,7 @@ print(result.output)
624624
#> The documents discuss the following key points: ...
625625
```
626626

627-
1. Replace `files/abc123` with your actual file resource name from the Gemini Files API.
628-
629-
!!! note "Gemini File Search API Status"
630-
The File Search Tool for Gemini was announced on November 6, 2025. The implementation may require adjustment as the official `google-genai` SDK is updated to fully support this feature.
631-
632-
### Configuration
633-
634-
The `FileSearchTool` accepts a list of vector store IDs:
635-
636-
- **OpenAI**: Vector store IDs created via the [OpenAI Files API](https://platform.openai.com/docs/api-reference/files)
637-
- **Google**: File resource names from the [Gemini Files API](https://ai.google.dev/gemini-api/docs/files)
638-
639-
```py {title="file_search_configured.py" test="skip"}
640-
from pydantic_ai import Agent, FileSearchTool
641-
642-
agent = Agent(
643-
'openai-responses:gpt-5',
644-
builtin_tools=[
645-
FileSearchTool(
646-
vector_store_ids=['vs_store1', 'vs_store2'] # (1)
647-
)
648-
]
649-
)
650-
651-
result = agent.run_sync('Find information across all my document collections.')
652-
print(result.output)
653-
```
654-
655-
1. You can provide multiple vector store IDs to search across different collections.
627+
1. Replace `files/abc123` with your actual file search store name from the Gemini Files API.
656628

657629
## API Reference
658630

0 commit comments

Comments
 (0)