-
Notifications
You must be signed in to change notification settings - Fork 771
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:
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
-
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? -
Is there a plan to increase this limit beyond 5 stores per request?