You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Copy file name to clipboardExpand all lines: docs/builtin-tools.md
+3-31Lines changed: 3 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -590,7 +590,7 @@ The [`FileSearchTool`][pydantic_ai.builtin_tools.FileSearchTool] enables your ag
590
590
591
591
#### OpenAI Responses
592
592
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`:
594
594
595
595
```py {title="file_search_openai.py" test="skip"}
596
596
from pydantic_ai import Agent, FileSearchTool
@@ -609,7 +609,7 @@ print(result.output)
609
609
610
610
#### Google (Gemini)
611
611
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:
613
613
614
614
```py {title="file_search_google.py" test="skip"}
615
615
from pydantic_ai import Agent, FileSearchTool
@@ -624,35 +624,7 @@ print(result.output)
624
624
#> The documents discuss the following key points: ...
625
625
```
626
626
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)
0 commit comments