Budibase/budibase · error · HTTPError
Gemini ingest did not return file_id
Error message
Gemini ingest did not return file_id
What it means
ingestGeminiFile treats a missing file_id in a non-failed ingest payload as a contract violation: without file_id the file cannot be tracked or removed later, so HTTPError 500 is thrown. Like error 514, this signals an unexpected response shape from LiteLLM.
Source
Thrown at packages/server/src/sdk/workspace/ai/knowledgeBase/geminiFileStore.ts:251
console.error("Gemini ingest failed", { error: payload.error })
if (payload.error.includes("fileSearchStores")) {
if (payload.error.includes("403")) {
throw new HTTPError(
"Gemini file store is inaccessible (403 Forbidden). Use 'Reset store' to recreate it.",
403
)
}
if (payload.error.includes("404")) {
throw new HTTPError(
"Gemini file store was not found (404). Use 'Reset store' to recreate it.",
404
)
}
}
throw new HTTPError(payload.error, 500)
}
if (!payload.file_id) {
throw new HTTPError("Gemini ingest did not return file_id", 500)
}
return {
fileId: payload.file_id,
}
}
export async function searchGeminiFileStore({
vectorStoreId,
query,
}: {
vectorStoreId: string
query: string
}): Promise<RagSearchResultItem[]> {
const geminiApiKey = getGeminiApiKey()
const sessionId = getLiteLLMSessionId()
const response = await requestWithRetries(async () =>
fetch(
`${environment.LITELLM_URL}/v1/vector_stores/${encodeURIComponent(View on GitHub (pinned to a81a902e9a)
Solutions
- Log/inspect the raw ingest response body to see what LiteLLM actually returned
- Upgrade or fix the LiteLLM proxy so /v1/rag/ingest returns { file_id, status, vector_store_id }
- Retry ingest; if it persists, reset the store and re-upload
Defensive patterns
Strategy: retry
Type guard
const hasFileId = (p: unknown): p is { file_id: string } =>
typeof p === "object" && p !== null && typeof (p as { file_id?: unknown }).file_id === "string"
Try / catch
try {
const { fileId } = await ingestGeminiFile({ ... })
} catch (e) {
if (e instanceof HTTPError && e.message.includes("did not return file_id")) {
// inspect LiteLLM response; upgrade proxy or retry ingest
}
} Prevention
- Pin a LiteLLM version that returns file_id from /v1/rag/ingest
- Integration-test the ingest endpoint against your proxy
- Alert on 2xx responses missing required fields
When it happens
Trigger: LiteLLM returns a 2xx ingest response whose JSON lacks file_id (different envelope, partial success response, or a proxy returning a non-ingest body).
Common situations: LiteLLM version not implementing the /v1/rag/ingest contract fully; proxy/gateway intercepting and returning 2xx with empty body; LiteLLM upgrade changed response field naming.
Related errors
- Gemini file store creation did not return an id
- ${text || fallbackMessage}
- ${payload.error}
- Provider ${config.provider} not found
- ${error?.message} || Failed to process uploaded file
AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29).
Data as JSON: /api/errors/9be06f2c5d4de706.
Report an issue: GitHub.