# Interactions File Search: 3 stores trigger “Max 5 corpora”; GenerateContent works

**URL:** <https://discuss.ai.google.dev/t/interactions-file-search-3-stores-trigger-max-5-corpora-generatecontent-works/197162>\
**Category:** Gemini API\
**Tags:** bug, api, gemini\
**Created:** [October 31, 2026, 8:15pm UTC](https://discuss.ai.google.dev/t/interactions-file-search-3-stores-trigger-max-5-corpora-generatecontent-works/197162 "2026-10-31T20:15:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leo\_Kraushaar](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/leo_kraushaar/32/25569_2.png) [@Leo\_Kraushaar](https://discuss.ai.google.dev/u/Leo_Kraushaar)\
**Post date:** [October 31, 2026, 8:15pm UTC](https://discuss.ai.google.dev/t/interactions-file-search-3-stores-trigger-max-5-corpora-generatecontent-works/197162/1 "2026-10-31T20:15:34Z")

</div>

We’re seeing a reproducible difference between Interactions and GenerateContent using `gemini-3.8-flash`.

| Request | Result |
| --- | --- |
| Interactions with one or two real, indexed stores | Succeeds |
| Interactions with three distinct stores | HTTP 400 |
| GenerateContent with the same three stores and metadata filter | Succeeds |
| Streaming GenerateContent with those three stores | Succeeds, with expected document citations |

The Interactions error is:

```auto
FileSearch.file_search_store_names: [FIELD_INVALID] Max 5 corpora can be specified

```

We also verified:

- The outgoing request contains exactly three distinct store names.
- Direct REST requests reproduce the failure, ruling out SDK serialization.
- Both `/v1` and `/v1beta` Interactions fail.
- Splitting the stores across three File Search tool declarations produces the same error.
- A separate test using three inaccessible store names produces the same count error, without accessing application documents.

Is this a known Interactions issue? What is the supported maximum number of File Search stores per interaction, and could the team investigate why three triggers a five-corpus limit?

We have a standalone reproduction available and can provide sanitized diagnostic details.

Reproduction .mjs script:

```auto
// Standalone reproduction. Uses no existing stores, documents or SHAI database.
import { randomUUID } from 'node:crypto';

if (process.argv.length !== 3 || process.argv[2] !== '--confirm-provider-requests') {
    throw new Error('Use --confirm-provider-requests. Sends three index-access checks and two synthetic Interactions requests.');
}
const key = process.env.GEMINI_API_KEY;
if (!key) throw new Error('GEMINI_API_KEY is required.');
const base = 'https://generativelanguage.googleapis.com/v1beta';
const headers = { 'x-goog-api-key': key, 'content-type': 'application/json' };
const names = Array.from({ length: 3 }, () => `fileSearchStores/shaimissing${randomUUID().replaceAll('-', '').slice(0, 20)}`);
for (const name of names) {
    const check = await fetch(`${base}/${name}`, { headers, redirect: 'error', signal: AbortSignal.timeout(10000) });
    const data = await check.json();
    if (!(check.status === 404 || (check.status === 403 && data.error?.status === 'PERMISSION_DENIED'))) {
        throw new Error('Index was not proven inaccessible; aborted without querying.');
    }
}
console.log(JSON.stringify({ verifiedInaccessible: 3, existingIndexesUsed: 0 }));
for (const count of [2, 3]) {
    const response = await fetch(`${base}/interactions`, {
        method: 'POST', headers, redirect: 'error', signal: AbortSignal.timeout(65000),
        body: JSON.stringify({
            model: 'gemini-3.8-flash',
            input: 'Use File Search to find the public visitor welcome phrase in the supplied KP visitor guide.',
            tools: [{
                type: 'file_search', file_search_store_names: names.slice(0, count),
                metadata_filter: 'shai_document_id = "00000000-0000-0000-0000-000000000000"',
            }],
            generation_config: { thinking_level: 'low' }, store: false, stream: false,
        }),
    });
    const data = await response.json();
    const result = { storeCount: count, httpStatus: response.status };
    if (!response.ok) {
        let message = String(data.error?.message ?? data.message ?? 'UNCLASSIFIED_ERROR').replaceAll(key, '[key]');
        for (const name of names) message = message.replaceAll(name, '[inaccessible-store]').replaceAll(name.slice('fileSearchStores/'.length), '[inaccessible-store]');
        result.error = message.slice(0, 500);
    } else {
        result.status = data.status;
        result.stepTypes = (data.steps ?? []).map(step => step.type);
    }
    console.log(JSON.stringify(result));
}

```

---

<div class="post-metadata">

**Author:** ![Mahesh\_Sutar](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/mahesh_sutar/32/31644_2.png) [@Mahesh\_Sutar](https://discuss.ai.google.dev/u/Mahesh_Sutar)\
**Post date:** [November 3, 2026, 5:09am UTC](https://discuss.ai.google.dev/t/interactions-file-search-3-stores-trigger-max-5-corpora-generatecontent-works/197162/2 "2026-11-03T05:09:58Z")

</div>

Hello @Leo_Kraushaar ,

Thank you for sharing the detailed comparison tests. We have reproduced this behavior. We are looking into it.

---

<div class="post-metadata">

**Author:** ![Leo\_Kraushaar](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/leo_kraushaar/32/25569_2.png) [@Leo\_Kraushaar](https://discuss.ai.google.dev/u/Leo_Kraushaar)\
**Post date:** [November 5, 2026, 8:20pm UTC](https://discuss.ai.google.dev/t/interactions-file-search-3-stores-trigger-max-5-corpora-generatecontent-works/197162/3 "2026-11-05T20:20:50Z")

</div>

Thank you Mahesh. Do you have any updates or workarounds? This is a pretty serious blocker for us.

---

<div class="post-metadata">

**Author:** ![Mahesh\_Sutar](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/mahesh_sutar/32/31644_2.png) [@Mahesh\_Sutar](https://discuss.ai.google.dev/u/Mahesh_Sutar)\
**Post date:** [November 11, 2026, 8:58am UTC](https://discuss.ai.google.dev/t/interactions-file-search-3-stores-trigger-max-5-corpora-generatecontent-works/197162/4 "2026-11-11T08:58:23Z")

</div>

Hello @Leo_Kraushaar ,

We recently deployed an update to address this issue. Could you please try again and let us know if you continue to face any issues?

---

<div class="post-metadata">

**Author:** ![Leo\_Kraushaar](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/leo_kraushaar/32/25569_2.png) [@Leo\_Kraushaar](https://discuss.ai.google.dev/u/Leo_Kraushaar)\
**Post date:** [November 11, 2026, 8:24pm UTC](https://discuss.ai.google.dev/t/interactions-file-search-3-stores-trigger-max-5-corpora-generatecontent-works/197162/5 "2026-11-11T20:24:44Z")

</div>

@Mahesh_Sutar yes it works now! Thank you for such a quick resolution and keeping me updated.
