googleapis / googleapis/python-genai

File Search: Maximum of 5 FileSearchStores in file_search_store_names? Documentation and Limits Clarification

Open
#2,074 1 comment 0 reactions 1 assignee Claimed by @Venkaiahbabuneelam View on GitHub
priority: p3 type: feature request type: question
Dominant language
Python
Stars
4k
Forks
1k
Avg merge
2d 11h
Merged PRs (30d)
40

Description

### Description

Hi team,

I’m using the Gemini API File Search tool with the Python SDK (`google-genai==1.56.0`).
When I include more than five FileSearchStore names in `file_search_store_names`, I consistently get a client validation error. I couldn’t find any documentation explaining this limit.

### What I'm trying to do

I’m trying to query multiple File Search stores in a single `generate_content` call by specifying multiple store names:

```python
from google import genai
from google.genai import types

client = genai.Client()

response = client.models.generate_content(
model="gemini-3-flash-preview",
contents="Example query",
config=types.GenerateContentConfig(
tools=[
types.Tool(
file_search=types.FileSearch(
file_search_store_names=[
"fileSearchStores/store1",
"fileSearchStores/store2",
"fileSearchStores/store3",
"fileSearchStores/store4",
"fileSearchStores/store5",
"fileSearchStores/store6",
]
)
)
]
)
)
```

### Error Message
`google.genai.errors.ClientError: 400 INVALID_ARGUMENT.
{'error': {'code': 400, 'message': '* GenerateContentRequest.tools[0].file_search.file_search_store_names: [FIELD_INVALID] Max 5 corpora can be specified\n', 'status': 'INVALID_ARGUMENT'}}`

### Questions
1. Is there any official documentation describing the limit on the number of `file_search_store_names`
that can be specified? If so, where is this limit described?

2. Is there a plan to increase this limit beyond 5 stores per request?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.